Skip to content
nsin docs

Scan the domain's existing DNS

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

Asks the domain’s current authoritative nameservers which records exist 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 — for MX, NS, SRV, CAA, TLSA, SSHFP and URI also the same value) or unsupported.

A zone transfer (AXFR) is tried first; when the nameservers refuse it, the apex and a list of common subdomain names — plus names found in a certificate-transparency index — are queried for A, AAAA, CNAME, MX and TXT records. A wildcard zone comes back as a single * record. The scan runs inline, within a time budget (2 minutes by default). Use it to review before calling scan-import, or use an import session, which runs the same scan in the background. Requires domain.view.

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

The record’s value.

string
ttl

TTL the record would be created with (120).

integer
mx_priority

MX priority. MX only.

integer
proxied

Whether the record would be proxied.

boolean
status

overwrite means an NSIN record with the same name and type (for MX, NS, SRV, CAA, TLSA, SSHFP and URI: and the same value) 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. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

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