nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Domains

Enable developer mode

posthttps://api.nsin.ir/domains/{domain}/developer-mode

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

Bypasses all cache reads and writes for this domain at the edge, so you always see the origin's current response. Auto-expires — the response carries the expiry — so a forgotten toggle can never permanently disable caching. Requires domain.settings.

It also adds a temporary error page rule (managed_by: developer_mode): origin mode for every 5xx on every path, evaluated before the domain's own error page rules. The origin's own error responses reach visitors instead of an error page. The rule is removed when developer mode ends, whether it is disabled or expires.

Calling this while developer mode is already on restarts the window from now. If the temporary rule was deleted, it is added back. If it was only switched off, it stays off.

Path parameters

  • domainstringrequiredpath

    The domain name (for example example.com) — not a numeric id.

Responses

200Developer mode enabled.

Content type: application/json

  • activeboolean
  • expires_atstring (date-time)

    When developer mode switches itself off. Absent when inactive.

json
{
  "active": true,
  "expires_at": "2026-01-01T00:00:00Z"
}
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}
403The key is read-only, your role on the domain lacks the required permission, or the domain's plan does not include the feature.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
429The key exceeded its request budget (300 requests per minute by default).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X POST "https://api.nsin.ir/domains/example.com/developer-mode" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc