Skip to content

Discard an import session

DELETE
/domains/{domain}/records/import-sessions/{sessionId}
curl --request DELETE \
--url https://api.nsin.ir/domains/example.com/records/import-sessions/1 \
--header 'Authorization: Bearer <token>'

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.

domain
required
string

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

Example
example.com
sessionId
required
integer

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

Discarded.

Media type application/json
object
discarded
boolean
records_dropped

How many staged rows were thrown away.

integer
Example generated
{
"discarded": true,
"records_dropped": 1
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key is read-only, your role on the domain lacks the required permission, or the domain’s plan does not include the feature.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

No such domain or import session, the session belongs to another domain, or the domain is not visible to this account.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example notFound
{
"error": "import session not found"
}

The session is no longer open — it has already been committed, superseded by a rescan, or discarded. The body carries its current status.

Media type application/json
object
error
required

Human-readable description of what went wrong.

string
status

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

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}