Get certificate status
const url = 'https://api.nsin.ir/domains/example.com/ssl/';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/ssl/ \ --header 'Authorization: Bearer <token>'The domain’s current certificate — issuer, validity, SANs, key size — plus
whether a manual re-issue is currently allowed, and coverage: proxied
hostnames that are not on the certificate yet, with their retry state.
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 ”Certificate status.
object
State of the domain’s own certificate: valid, expired,
pending (an order is running), failed (the last order failed;
see failure_count and next_retry_at) or none (no certificate
yet).
End of the certificate’s validity.
Start of its validity.
Whole days until expiry.
The certificate’s issuer.
The certificate’s subject.
Serial number, hex.
The names the certificate covers.
Signature algorithm.
Public key size in bits.
The certificate carries a wildcard name.
Whether NSIN renews this certificate itself. True for managed-DNS
domains and for external-DNS domains whose ssl_delegation is in
place; false for an external-DNS domain that uploads its own.
NSIN holds the private key, so the certificate can be served.
Whether POST /domains/{domain}/ssl/issue would be accepted right now.
Why manual issuance is unavailable, when can_manual_issue is false.
When the next manual issue is allowed (one per hour).
When a manual issue was last requested.
Consecutive failed orders for the domain’s own certificate. status
flips to failed on the first one while retries continue; compare
with max_retries to tell “still retrying” from “given up”. Absent
when nothing has failed.
How many automatic retries a failing order gets. Absent when nothing has failed.
When the next automatic retry runs. Absent when none is scheduled.
Why the last order failed, in the certificate authority’s words.
The name the reported certificate is installed under — usually the apex, but a domain may hold a certificate for one subdomain only.
Every name of this domain with an active certificate, sorted.
Proxied names with no certificate behind them, sorted. External-DNS
domains only — for managed domains the same gaps arrive in
coverage, with the retry schedule that applies when we can issue.
Proxied hostnames not yet on the certificate. Absent when coverage is complete.
A proxied hostname that the domain’s certificate does not cover yet.
object
pending — being issued; failed — the last attempt failed; missing — not requested yet.
Failed attempts so far for this name.
Automatic retries a failing name gets.
When the next automatic retry runs.
The certificate authority’s own reason for the last failure.
Whether the served certificate chains to a public root. false means
no browser will accept it — a private CA (for example a Cloudflare
Origin CA certificate), a self-signed certificate, or an internal
PKI. Absent when the bundle has not been evaluated, which is a
different state from false and should not be shown as a failure.
Why the certificate is flagged, phrased for the certificate’s owner.
Can be present even when trusted is true — an otherwise genuine
certificate missing its intermediate is reported here.
The bundle carries no intermediate certificate. Clients that do not
already hold the issuer fail the handshake with “unable to get local
issuer certificate”. Independent of trusted. Absent when the bundle
has not been evaluated.
The certificate on display is one you chose, rather than whatever
the domain would serve by default. See
GET /domains/{domain}/ssl/certificates.
Where the certificate being served came from.
NSIN holds an unexpired certificate of its own for this domain — i.e. there is something to switch back to.
You have already asked NSIN to issue alongside your upload and the order is on its way.
Whether POST /domains/{domain}/ssl/certificates/request would be
accepted right now.
Example
{ "status": "valid", "coverage": [ { "status": "pending" } ], "source": "acme"}Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
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"}