REST API
The NSIN REST API does everything the panel does: domains, DNS records, edge rules, certificates, cache, analytics, uptime and sharing.
- Base URL:
https://api.nsin.cloud - Authentication: an API key
- Full endpoint reference: REST API Reference — every endpoint with its parameters, request and response schemas, generated from the same OpenAPI document the API itself serves.
- Swagger UI: try the endpoints — sends real requests
- Standalone explorer: single-page reference — the whole
API on one filterable page, the same one served at
api.nsin.cloud/docs.
The machine-readable OpenAPI document is at
/docs/openapi.yaml — point your client generator,
Postman or IDE straight at it. It is the same document the API serves at
api.nsin.cloud/openapi.yaml, kept identical by a test rather than by habit.
Authenticate
Section titled “Authenticate”Send your key in whichever header suits your client — they’re equivalent:
curl -H "Authorization: Bearer nsin_your_key_here" https://api.nsin.cloud/domains/curl -H "X-Api-Key: nsin_your_key_here" https://api.nsin.cloud/domains/A key acts as you: domains you own and domains
shared with you are reachable exactly as in the panel,
and domain roles apply on top. A read-only key may only issue GET, HEAD
and OPTIONS.
Conventions
Section titled “Conventions”{domain} is the domain name. Every path segment written as {domain} takes
the name — example.com — not a numeric id:
curl -H "X-Api-Key: $NSIN_KEY" \ https://api.nsin.cloud/domains/example.com/records/Trailing slashes matter. Use the paths exactly as the reference writes them
(/domains/ and /domains/{domain}/records/ have one; /domains/{domain} does
not).
Errors are uniform. Every error is {"error": "human readable message"}.
Timestamps are RFC 3339 in UTC. Byte counts are bytes.
What a key cannot do
Section titled “What a key cannot do”Some surfaces return 403 for every key, so a leaked key can never take over
the account or spend money:
| Surface | Why |
|---|---|
/users/** | Profile, password, sessions, API-key management. A key cannot mint or revoke keys. |
/auth/** | Login, registration, OTP. |
/billing/** | Plan catalogue and billing settings. |
/admin/** | Administrative surface. |
POST /wallet/topup | Moves money. |
POST …/subscriptions/purchase, /switch, /auto-renew | Moves money. |
Reading subscription, feature, traffic-usage, invoice and wallet state is allowed — only the money-moving writes are blocked.
Rate limits
Section titled “Rate limits”300 requests per minute per key by default. Over it you get 429 with
{"error": "rate limit exceeded"}. Panel (browser) traffic is limited separately
and doesn’t consume your key’s budget.
Status codes
Section titled “Status codes”| Code | Meaning |
|---|---|
400 | Invalid input. |
401 | Missing, invalid or revoked key. |
403 | Read-only key on a write, insufficient domain role, denied surface, or a feature not on the plan. |
404 | Not found — or not visible to you. |
409 | Conflict, e.g. the domain is already registered or is disabled. |
429 | Rate limited. |
What’s in the reference
Section titled “What’s in the reference”| Group | Covers |
|---|---|
| Domains | Add, configure, verify, enable and remove domains; developer mode; nameserver checks. |
| DNS Records | Record CRUD, batch update/delete, zone scan and BIND import. |
| SSL | Certificate status, manual issuance, custom certificate upload and parsing. |
| Rules | All twelve rule types, each with the same seven-endpoint shape (list, create, reorder, get, update, delete, toggle). |
| Cache | Footprint stats, browsing stored entries, purge and refresh. |
| Analytics | Traffic, visitors, bandwidth, cache, status codes, geography, logs, WAF logs and ad-hoc queries. |
| Uptime | Outage incidents, live per-host status, detection settings. |
| Recommendations | The advisory checklist and its dismissals. |
| Sharing | Members, roles, invitations. |
| Billing | Read-only subscriptions, features, traffic usage, invoices and wallet. |
| Support | Tickets and replies. |
A first request
Section titled “A first request”export NSIN_KEY=nsin_your_key_here
# List your domainscurl -H "X-Api-Key: $NSIN_KEY" https://api.nsin.cloud/domains/
# Create a proxied A recordcurl -X POST -H "X-Api-Key: $NSIN_KEY" -H "Content-Type: application/json" \ -d '{"name":"www","type":"A","destination":"203.0.113.10","proxied":true}' \ https://api.nsin.cloud/domains/example.com/records/
# Purge the domain's cachecurl -X DELETE -H "X-Api-Key: $NSIN_KEY" \ https://api.nsin.cloud/domains/example.com/cache/