nsindocs Search the docs⌘K
  1. Docs
  2. API & MCP

API Keys

Manage API keys for programmatic access to domains, DNS, cache and analytics.

On this page

API keys let scripts, CI and AI tools call the API as you — your domains, shared domains, panel roles.

Creating a key

  1. Open the panel, avatar → Settings → API keys.
  2. Click Create key, name it (e.g. CI deploy).
  3. Pick expiry (never / 30 / 90 / 365 days), read-only or not.
  4. Copy the key now.

Format:

text
nsin_a1b2c3d4e5f6…  (69 characters)

Full access vs read-only

Mode What it can do
Full access Everything your account can do — records, rules, cache, SSL.
Read-only Every GET, plus POST /analytics/query (sandboxed: one SELECT over your logs). No writes.

Domain roles apply — a shared Viewer can't edit records, even with full access.

Authenticating requests

Either header works — MCP clients use Authorization: Bearer:

bash
curl -H "Authorization: Bearer nsin_your_key_here" https://api.nsin.ir/domains/
curl -H "X-Api-Key: nsin_your_key_here" https://api.nsin.ir/domains/

Limits and restrictions

  • Rate limit: 300 requests/minute per key; over that, 429.
  • Blocked: account (/users/…), billing (/billing/…), admin, auth — can't create or revoke keys.
  • Cap: 10 active keys per account.

Usage and revocation

API keys tab: last-used time, 30-day chart. Revoking is immediate — 401 on in-flight and future requests.

esc