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

Discard an import session

deletehttps://api.nsin.ir/domains/{domain}/records/import-sessions/{sessionId}

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

The "skip for now" path: the staged rows are dropped, nothing is written to the zone, and the auto-commit is cancelled — somebody who explicitly skipped the review must not get a surprise import hours later. Requires records.edit.

The records themselves are untouched at the old provider; run another scan whenever you want them.

Path parameters

  • domainstringrequiredpath

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

  • sessionIdintegerrequiredpath

    Numeric id of the record import session. Sessions are resolved within the domain, so an id from another domain reads as not found.

Responses

200Discarded.

Content type: application/json

  • discardedboolean
  • records_droppedinteger

    How many staged rows were thrown away.

json
{
  "discarded": true,
  "records_dropped": 0
}
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 import session, the session belongs to another domain, or the domain is not visible to this account.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "import session not found"
}
409The session is no longer open — it has already been committed, superseded by a rescan, or discarded. The body carries its current status.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

  • statusstring

    The session's status as it stands now, so a loser of the claim race can tell "already committed" from "discarded".

json
{
  "error": "string",
  "status": "string"
}
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 DELETE "https://api.nsin.ir/domains/example.com/records/import-sessions/0" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc