Discard an import session
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.
{
"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.
{
"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.
{
"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.
{
"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".
{
"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.
{
"error": "rate limit exceeded"
}Example request
curl -X DELETE "https://api.nsin.ir/domains/example.com/records/import-sessions/0" \
-H "Authorization: Bearer $NSIN_API_KEY"