Guides
Getting started
Create a key, send it on every /api/v1 request, then rent with a catalog code. Replace example codes with real ones from the catalog.
Create an API key
Open Dashboard → API keys. Keys look like lsms_xxxxxxxx_your_secret. You can also set a webhook URL and secret on the key or the account.
Authentication
Send the key on every /api/v1/* request. Public catalog endpoints need no key.
Headers
X-API-Key: lsms_xxxxxxxx_your_secret
# or
Authorization: Bearer lsms_xxxxxxxx_your_secretFirst rent
- 1
GET /api/v1/services— pick a row with stock. Copy itscode(for examples1-5). - 2
GET /api/v1/balance— confirm wallet funds. - 3
POST /api/v1/rentalswith{ "code": "s1-5" }, orkind+serviceNo. SendIdempotency-Key. - 4Poll
GET /api/v1/rentals/{id}untilotpCodeis set — or use webhooks. - 5
POST .../donewhen finished, orPOST .../cancelwhile stillWAITINGfor a refund.
How to identify a service
Catalog rows always include
kind, serviceNo / planNo, and code (kind-number). These two bodies are equivalent:JSON
{ "code": "s1-5" }
{ "kind": "s1", "serviceNo": 5 }cURL
Replace the domain and API key. code values below are examples.
shell
# Countries
curl -s -H "X-API-Key: lsms_xxx_your_secret" \
"https://your-domain.com/api/v1/countries" | jq .
# Services (US)
curl -s -H "X-API-Key: lsms_xxx_your_secret" \
"https://your-domain.com/api/v1/services?country=US&q=google" | jq .
# Balance
curl -s -H "X-API-Key: lsms_xxx_your_secret" \
"https://your-domain.com/api/v1/balance" | jq .
# Rent
curl -s -X POST -H "Content-Type: application/json" \
-H "X-API-Key: lsms_xxx_your_secret" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"code":"s1-5","country":"US"}' \
"https://your-domain.com/api/v1/rentals" | jq .
# Poll
curl -s -H "X-API-Key: lsms_xxx_your_secret" \
"https://your-domain.com/api/v1/rentals/1042?sync=1" | jq .
# Long-term
curl -s -H "X-API-Key: lsms_xxx_your_secret" \
"https://your-domain.com/api/v1/long-term/plans?q=google" | jq .
curl -s -X POST -H "Content-Type: application/json" \
-H "X-API-Key: lsms_xxx_your_secret" \
-d '{"code":"l2-3"}' \
"https://your-domain.com/api/v1/long-term/rentals" | jq .