Authentication
Every request needs an API key. Create keys in Admin → API keys. A key belongs to either the platform (full access) or a single customer account (scoped to its own data).
Send the key as X-API-Key or as a bearer token:
curl https://sip.livevoip.online/api/v1/me \
-H "X-API-Key: sk_live_your_key"
Scopes: account keys are created with read or read,write. Write access is required to create trunks or reset passwords. Balance top-ups always require an account-level key.
Quick start
- Sign in to the portal and open Admin → API keys.
- Create a key, copy it once, and store it in your secret manager.
- Create a customer with
make_sip: true— the response contains the SIP username and one-time password. - Top up the balance, then use the trunk credentials in the customer's PBX.
curl -X POST https://sip.livevoip.online/api/v1/customers \ -H "X-API-Key: sk_live_your_key" \ -H "Content-Type: application/json" \ -d '{"name":"Acme Retail","make_sip":true}'
Endpoints
Base URL https://sip.livevoip.online/api/v1. All responses are JSON; timestamps are UTC ISO-8601.
| Method | Path | Purpose | Key |
|---|---|---|---|
| GET | /me | Key scope and linked customer | any |
| GET | /status | Asterisk and API health | any |
| GET | /customers | List customers (search, paging) | platform |
| POST | /customers | Create customer + optional SIP trunk | platform |
| GET | /customers/{code} | Account details and balance | any* |
| PATCH | /customers/{code} | Status, credit limit, rate plan, contact | platform |
| GET | /customers/{code}/balance | Live balance and available credit | any* |
| POST | /customers/{code}/topup | Credit or adjust the balance | platform |
| GET | /customers/{code}/sip-accounts | List trunk credentials | any* |
| POST | /customers/{code}/sip-accounts | Create a SIP trunk | write* |
| POST | /customers/{code}/sip-accounts/{username}/reset | Rotate trunk password | write* |
| GET | /customers/{code}/cdrs | Rated call records | any* |
| GET | /customers/{code}/usage | Call count, minutes, spend | any* |
| GET | /cdrs | All CDRs (platform) or own CDRs | any |
| GET | /dids | Inbound numbers | any |
| GET | /rates | Live sell rates for a plan | any |
| GET | /rate-plans | List rate plans | platform |
| POST | /rate-plans/{id}/rates | Create or update a prefix rate | platform |
| GET | /trunks | Upstream trunks (secrets hidden) | platform |
| GET | /ledger | Balance movements | any* |
| POST | /config/apply | Regenerate & reload Asterisk config | platform |
* Account-scoped keys can only access their own customer code. Platform keys use the full path.
Examples
Top up a balance
curl -X POST https://sip.livevoip.online/api/v1/customers/DEMO1001/topup \ -H "X-API-Key: sk_live_your_key" \ -H "Content-Type: application/json" \ -d '{"amount":100,"reference":"INV-1042"}'
Fetch the rate deck
curl "https://sip.livevoip.online/api/v1/rates?q=44" \ -H "X-API-Key: sk_live_your_key"
Read today's CDRs
curl "https://sip.livevoip.online/api/v1/cdrs?date_from=2026-01-01&limit=100" \ -H "X-API-Key: sk_live_your_key"
Errors & limits
| Status | Meaning | Action |
|---|---|---|
| 401 | Missing or invalid API key | Check the key and header name |
| 403 | Key scope does not allow this action | Use a platform key or add write scope |
| 404 | Customer, DID or rate plan not found | Verify the account code |
| 409 | Customer code already exists | Choose a different code |
| 429 | Rate limit exceeded | 120 requests per minute per key |
| 500 | Asterisk reload or server error | Check Admin → System |
Timestamps are UTC. Monetary values are decimal JSON numbers in the account currency. List endpoints accept limit and offset.
SIP connection details
Retail trunks register to this platform over UDP with digest authentication. Give the customer:
The trunk accepts calls to any destination that matches an enabled outbound route and rate. Inbound DIDs are delivered to the assigned SIP account.