Skip to content

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.

Send your key in whichever header suits your client — they’re equivalent:

Terminal window
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.

{domain} is the domain name. Every path segment written as {domain} takes the name — example.com — not a numeric id:

Terminal window
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.

Some surfaces return 403 for every key, so a leaked key can never take over the account or spend money:

SurfaceWhy
/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/topupMoves money.
POST …/subscriptions/purchase, /switch, /auto-renewMoves money.

Reading subscription, feature, traffic-usage, invoice and wallet state is allowed — only the money-moving writes are blocked.

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.

CodeMeaning
400Invalid input.
401Missing, invalid or revoked key.
403Read-only key on a write, insufficient domain role, denied surface, or a feature not on the plan.
404Not found — or not visible to you.
409Conflict, e.g. the domain is already registered or is disabled.
429Rate limited.
GroupCovers
DomainsAdd, configure, verify, enable and remove domains; developer mode; nameserver checks.
DNS RecordsRecord CRUD, batch update/delete, zone scan and BIND import.
SSLCertificate status, manual issuance, custom certificate upload and parsing.
RulesAll twelve rule types, each with the same seven-endpoint shape (list, create, reorder, get, update, delete, toggle).
CacheFootprint stats, browsing stored entries, purge and refresh.
AnalyticsTraffic, visitors, bandwidth, cache, status codes, geography, logs, WAF logs and ad-hoc queries.
UptimeOutage incidents, live per-host status, detection settings.
RecommendationsThe advisory checklist and its dismissals.
SharingMembers, roles, invitations.
BillingRead-only subscriptions, features, traffic usage, invoices and wallet.
SupportTickets and replies.
Terminal window
export NSIN_KEY=nsin_your_key_here
# List your domains
curl -H "X-Api-Key: $NSIN_KEY" https://api.nsin.cloud/domains/
# Create a proxied A record
curl -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 cache
curl -X DELETE -H "X-Api-Key: $NSIN_KEY" \
https://api.nsin.cloud/domains/example.com/cache/