Docs

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_secret

First rent

  1. 1GET /api/v1/services — pick a row with stock. Copy its code (for example s1-5).
  2. 2GET /api/v1/balance — confirm wallet funds.
  3. 3POST /api/v1/rentals with { "code": "s1-5" }, or kind + serviceNo. Send Idempotency-Key.
  4. 4Poll GET /api/v1/rentals/{id} until otpCode is set — or use webhooks.
  5. 5POST .../done when finished, or POST .../cancel while still WAITING for 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 .