API Reference
Reseller API: sell Silux Call from your own website
For white-label resellers: list plans, search numbers, create customer accounts, buy numbers onto them, change plans and suspend accounts, all from your own website or systems.
The Reseller API lets an approved white-label reseller run the whole sale on their own website: show plans at your prices, let the customer pick a UK number, create their account and put the number live, without anyone logging in to the Silux Call dashboard. Everything you create is billed to you on your monthly wholesale invoice, and your customers only ever deal with your brand.
Who can use it
- •Approved white-label resellers. Apply at /white-label if you are not one yet.
- •The API acts only on your own customers (accounts created by you or assigned to you). It can never see or change anyone else.
- •Your own customer API (click-to-call, call history) is separate and documented under API Authentication and API Endpoints.
1. Get an API key
- Sign in to your reseller account and open Dashboard → API.
- Press Create key and give it a name, for example "Our website".
- Copy the key straight away. It starts sk_live_ and is shown once only. We store only a fingerprint of it.
- Keep it on your server. Never put it in a web page, app or anything a customer can see.
Anyone with your key can create customers and buy numbers that are billed to you. If a key leaks, revoke it in Dashboard → API and create a new one.
2. Authenticate every request
Send the key in the Authorization header. All requests and responses are JSON over HTTPS.
curl https://www.siluxcall.co.uk/api/reseller/v1/me \
-H "Authorization: Bearer sk_live_YOUR_KEY"| Item | Value |
|---|---|
| Base URL | https://www.siluxcall.co.uk/api/reseller/v1 |
| Auth header | Authorization: Bearer sk_live_... (or X-Api-Key: sk_live_...) |
| Format | JSON. Successful responses are wrapped as { "data": ... } |
| Rate limit | 10,000 requests per key per day (resets at midnight UTC) |
| Machine-readable spec | https://www.siluxcall.co.uk/api/reseller/v1/openapi.json (OpenAPI 3) |
Errors
Errors use normal HTTP status codes and a JSON body with a code you can test for and a message you can show.
{
"statusCode": 400,
"code": "number_unavailable",
"message": "That number is not available. Search again with GET /numbers."
}| Status | code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Key missing, wrong or revoked |
| 403 | not_a_reseller | The key belongs to an account that is not an approved reseller |
| 403 | account_inactive | Your reseller account is suspended |
| 404 | customer_not_found | No customer with that id under your account |
| 400 | missing_fields | A required field is missing |
| 400 | invalid_number / number_unavailable | The number is not a UK 01, 02 or 03 number, or has just been taken |
| 400 | customer_inactive | You tried to buy a number for a suspended customer |
| 400 | purchase_failed | Our supplier could not supply the number right now; nothing is billed |
| 429 | daily_limit | The key has used its requests for today |
Endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /me | Your reseller account and how many customers you have |
| GET | /plans | Plans you can sell, with our wholesale price and your retail price |
| GET | /numbers | Search available UK numbers (areaCode, town, contains, page, pageSize) |
| GET | /customers | List your customers (search, page, limit) |
| POST | /customers | Create a customer account and its first admin login |
| GET | /customers/{id} | One customer: plan, numbers, users and number purchases in progress |
| PATCH | /customers/{id}/plan | Change the customer's plan |
| PATCH | /customers/{id}/status | Suspend (SUSPENDED) or reactivate (ACTIVE) |
| POST | /customers/{id}/numbers | Buy a number onto the customer |
| GET | /number-purchases/{purchaseId} | Progress of a number purchase: requested, live or failed |
GET /plans
Use packageId when you create a customer or change a plan. Prices are in pence, excluding VAT. resellerPriceCents is the retail price you set in Dashboard → Pricing & Margins (null if you have not set one, in which case you sell at our price).
{
"data": [
{
"packageId": "pkg_…",
"name": "Plus",
"slug": "plus",
"wholesalePriceCents": 895,
"resellerPriceCents": 1195,
"marginCents": 300,
"floorCents": 895,
"currency": "gbp",
"isActive": true
}
]
}GET /numbers
Search the live stock of UK numbers. Filter by area code (0113), town (leeds) or digits the number contains. Up to 100 results a page.
curl "https://www.siluxcall.co.uk/api/reseller/v1/numbers?areaCode=0113&pageSize=5" \
-H "Authorization: Bearer sk_live_YOUR_KEY"{
"data": {
"items": [
{ "number": "01133206400", "areaCode": "0113", "town": "Leeds" }
],
"page": 1,
"total": 412
}
}POST /customers
Creates the customer's account under you, with their first admin login. companyName and adminEmail are required. If you leave out adminPassword we make a strong temporary one and return it once, so you can pass it to your customer in your own welcome email.
curl -X POST https://www.siluxcall.co.uk/api/reseller/v1/customers \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"companyName": "Acme Plumbing Ltd",
"adminEmail": "office@acmeplumbing.co.uk",
"adminFirstName": "Sam",
"adminLastName": "Jones",
"packageId": "pkg_…"
}'{
"data": {
"id": "c0ffee00-…",
"name": "Acme Plumbing Ltd",
"status": "ACTIVE",
"adminEmail": "office@acmeplumbing.co.uk",
"temporaryPassword": "kq3…"
}
}POST /customers/{id}/numbers
Buys an available number (from GET /numbers) straight onto the customer. The call returns at once with a purchase id; the number normally goes live within a few minutes. When it is live it rings the customer's account and is added as a landline on your next wholesale invoice.
curl -X POST https://www.siluxcall.co.uk/api/reseller/v1/customers/CUSTOMER_ID/numbers \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "number": "01133206400" }'{
"data": {
"id": "rp_9f2c…",
"customerId": "c0ffee00-…",
"number": "01133206400",
"status": "requested",
"requestedAt": "2026-11-11T10:02:11.000Z"
}
}GET /number-purchases/{purchaseId}
Check every 30 to 60 seconds until status is live or failed. failed means the supplier could not supply that number: nothing is billed and the number is released, so offer the customer another one.
{ "data": { "id": "rp_9f2c…", "number": "01133206400", "status": "live", "liveAt": "2026-11-11T10:04:40.000Z" } }PATCH /customers/{id}/plan and /status
# change plan
curl -X PATCH https://www.siluxcall.co.uk/api/reseller/v1/customers/CUSTOMER_ID/plan \
-H "Authorization: Bearer sk_live_YOUR_KEY" -H "Content-Type: application/json" \
-d '{ "packageId": "pkg_…" }'
# suspend the customer’s account (reactivate later with ACTIVE)
curl -X PATCH https://www.siluxcall.co.uk/api/reseller/v1/customers/CUSTOMER_ID/status \
-H "Authorization: Bearer sk_live_YOUR_KEY" -H "Content-Type: application/json" \
-d '{ "status": "SUSPENDED" }'Worked example: a sale on your website
- Your pricing page calls GET /plans (cache it for an hour) and shows your retail prices.
- Your number picker calls GET /numbers?areaCode=… as the customer types their area.
- The customer pays you on your own checkout (your card processor, your terms).
- Your server calls POST /customers with their details and the chosen packageId.
- Your server calls POST /customers/{id}/numbers with the number they picked.
- Your server checks GET /number-purchases/{purchaseId} until it is live, then sends your own welcome email with their login and number.
// Node.js 18+ (server side only)
const API = "https://www.siluxcall.co.uk/api/reseller/v1";
const H = { Authorization: `Bearer ${process.env.SILUX_RESELLER_KEY}`, "Content-Type": "application/json" };
async function sell({ company, email, packageId, number }) {
const c = await (await fetch(`${API}/customers`, { method: "POST", headers: H,
body: JSON.stringify({ companyName: company, adminEmail: email, packageId }) })).json();
const p = await (await fetch(`${API}/customers/${c.data.id}/numbers`, { method: "POST", headers: H,
body: JSON.stringify({ number }) })).json();
for (let i = 0; i < 20; i++) {
await new Promise((r) => setTimeout(r, 30000));
const s = await (await fetch(`${API}/number-purchases/${p.data.id}`, { headers: H })).json();
if (s.data.status !== "requested") return { customer: c.data, purchase: s.data };
}
return { customer: c.data, purchase: p.data }; // still in progress: check again later
}<?php
// PHP 8 with cURL (server side only)
function silux(string $method, string $path, ?array $body = null) {
$ch = curl_init("https://www.siluxcall.co.uk/api/reseller/v1" . $path);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => $method,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("SILUX_RESELLER_KEY"), "Content-Type: application/json"],
CURLOPT_POSTFIELDS => $body ? json_encode($body) : null,
]);
$res = json_decode(curl_exec($ch), true);
curl_close($ch);
return $res;
}
$plans = silux("GET", "/plans");Billing
- •Each customer is billed to you monthly at our wholesale price for their plan, on your wholesale invoice (Dashboard → Customer Billing).
- •Each number bought through the API is a landline on that customer and is billed from the month it goes live.
- •You bill your customer yourself, at your own prices. Your margin is your retail price minus our wholesale price.
- •Suspended customers are not billed for the months they are suspended.
Your brand, your customer
- •We do not email or text customers you create through the API. Send your own welcome message with their login details.
- •Your customers log in on your branded portal (your subdomain) and see your logo and colours.
- •Support for your customers comes from you; you can raise anything with us through your own reseller account.
Good practice
- •Keep keys on your server, one key per system, and revoke any you no longer use.
- •Retry only on network errors or 5xx responses, with a pause. Do not retry POST /customers blindly: search for the customer first, so you never create two accounts.
- •Numbers move fast. Reserve the customer's choice by calling POST /customers/{id}/numbers as soon as they pay, and handle number_unavailable by offering another number.
- •All plans are for normal business calling under our Fair Use Policy. Sales, marketing and call-centre use is not allowed for your customers either.
Questions about the Reseller API, or need something it does not do yet? Email support@siluxcall.co.uk from your reseller account.