API Reference
API Authentication
Creating an API key and authenticating requests.
The API accepts two credentials: a session JWT for interactive use, and a long-lived API key for server-to-server integration. All endpoints live under the /api prefix.
Creating an API key
Keys are per tenant. Create one with an authenticated session:
curl -X POST https://www.siluxcall.co.uk/api/developer/api-keys \
-H "Authorization: Bearer <your-session-jwt>" \
-H "Content-Type: application/json" \
-d '{"label": "Billing sync", "rateLimit": 10000}'The response contains the raw key, which begins sk_live_. It is shown once and only once — we store a SHA-256 hash, so we cannot show it to you again. If you lose it, revoke it and create another.
An API key carries your tenant's access. Keep it in a secrets manager or environment variable, never in client-side code or a public repository.
Using a key
curl https://www.siluxcall.co.uk/api/cdr?limit=50 \
-H "Authorization: Bearer sk_live_..."Managing keys
| Action | Endpoint |
|---|---|
| List keys | GET /api/developer/api-keys |
| Create a key | POST /api/developer/api-keys |
| Revoke a key | DELETE /api/developer/api-keys/:id |
Revocation takes effect immediately. Rotate keys by creating the replacement, deploying it, then revoking the old one — in that order, so you never have a gap.
Rate limits
Each key has a request limit you choose at creation, between 100 and 1,000,000. Pick a number that reflects real use, so a runaway loop in your own code is caught early.