Skip to content

Scan the domain's existing DNS from public resolvers

GET
/domains/{domain}/records/scan
curl --request GET \
--url https://api.nsin.ir/domains/example.com/records/scan \
--header 'Authorization: Bearer <token>'

Queries public resolvers for records that already exist for this domain and returns them as an import preview — nothing is written. Each entry is marked new, overwrite (an NSIN record with the same name and type already exists) or unsupported.

Use this to review before calling scan-import. Requires records.edit.

domain
required
string

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

Example
example.com

Scan preview.

Media type application/json
object
records
Array<object>
object
name
string
type
string
Allowed values: A AAAA CNAME ANAME NS TXT MX SRV PTR CAA TLSA SSHFP URI
destination
string
ttl
integer
mx_priority
integer
proxied
boolean
status

overwrite means an NSIN record with the same name and type already exists and would be replaced.

string
Allowed values: new overwrite unsupported
existing_id

Set when status is overwrite.

integer
reason

Why an entry is unsupported.

string
Example
{
"records": [
{
"type": "A",
"status": "new"
}
]
}

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 it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

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"
}

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"
}