List DNS records
const url = 'https://api.nsin.ir/domains/example.com/records/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.nsin.ir/domains/example.com/records/ \ --header 'Authorization: Bearer <token>'All records of the domain, newest first.
Proxied records may carry origin_rules — origin route or origin pool
rules that override where that record’s traffic actually goes, so the
effective origin is not the record’s destination. Routes are listed
before pools, mirroring edge precedence.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comResponses
Section titled “ Responses ”Record list.
object
Record name relative to the domain. @ is the apex.
The fully-qualified name, with trailing dot.
The record’s value. For a proxied record this is the origin the
edge connects to, and the published DNS answer is the NSIN proxy IP
instead — see dns_content.
What is actually published in DNS. Equals the proxy IP for proxied records.
TTL in seconds.
Route this hostname through the NSIN edge. Only A, AAAA, CNAME
and ANAME may be proxied.
Challenge visitors before passing them to the origin.
False for records NSIN manages on your behalf.
Protocol the edge uses to reach the origin for a proxied record.
Default follows the request’s own scheme; Auto probes.
Origin port for proxied records. Default: 443.
Overrides the Host header (and SNI) sent to the origin.
Include this record in uptime monitoring.
ISO country code of the destination, detected by NSIN.
Upstream timeout in seconds. Default: 15.
Only meaningful for MX.
Free-form note.
Absent when nothing overrides this record’s origin. Routes are listed before pools.
An enabled origin rule that overrides where a proxied record’s traffic
goes, meaning the effective origin is not the record’s destination.
object
True when the rule applies to every proxied record of the domain.
The rule is evaluated but not enforced.
Example
[ { "name": "www", "original_name": "www.example.com.", "type": "A", "scheme": "Http", "origin_rules": [ { "type": "origin_route" } ] }]Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid 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.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}