Scan the domain's existing DNS
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
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.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id.
Responses
200Scan preview.
Content type: application/json
- recordsarray of ImportPreviewRecord
Item fields
- namestring
- typestringOne of:
"A""AAAA""CNAME""ANAME""NS""TXT""MX""SRV""PTR""CAA""TLSA""SSHFP""URI" - destinationstring
The record's value.
- ttlinteger
TTL the record would be created with (120).
- mx_priorityinteger
MX priority.
MXonly. - proxiedboolean
Whether the record would be proxied.
- statusstring
overwritemeans an NSIN record with the same name and type (forMX,NS,SRV,CAA,TLSA,SSHFPandURI: and the same value) already exists and would be replaced.One of:"new""overwrite""unsupported" - existing_idinteger
Set when
statusisoverwrite. - reasonstring
Why an entry is
unsupported.
{
"records": [
{
"name": "string",
"type": "A",
"destination": "string",
"ttl": 0,
"mx_priority": 0,
"proxied": true,
"status": "new",
"existing_id": 0,
"reason": "string"
}
]
}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 it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}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 GET "https://api.nsin.ir/domains/example.com/records/scan" \
-H "Authorization: Bearer $NSIN_API_KEY"