Skip to content

List the domain's certificates

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

A domain can hold more than one certificate at a time: the one NSIN issues and renews for it, and any you upload. Only one of them answers the handshake for a given hostname — in_use_for says which hostnames each certificate is serving right now, and an empty in_use_for means the domain holds it but is serving something else.

covers is the subset of this domain’s hostnames the certificate could serve, i.e. what selecting it would switch over. selectable is false when it cannot serve at all — expired, no stored private key, not trusted by browsers, or covering none of the domain’s names — and reason says which.

domain
required
string

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

Example
example.com

The domain’s certificates, the one in use first.

Media type application/json
object
certificates
Array<object>

One certificate a domain holds. id is what /ssl/certificates/{certificateId}/select takes.

object
id
integer
source
string
Allowed values: acme acme-staging uploaded
managed

NSIN issues and renews this one.

boolean
subject
string
issuer
string
serial_number
string
sans

Every name on the certificate.

Array<string>
signature_algorithm
string
key_size
integer
is_wildcard
boolean
issued_at
string format: date-time
expires_at
string format: date-time
days_remaining
integer
expired
boolean
trusted

The certificate chains to a public root. Absent when it has not been evaluated.

boolean
trust_note
string
leaf_only

The bundle carries no intermediate certificate.

boolean
has_private_key

The private key is stored. Without it the edge cannot complete a handshake, so the certificate cannot be selected.

boolean
in_use_for

The domain’s hostnames this certificate is serving right now. Empty means the domain holds it but is serving something else.

Array<string>
covers

The domain’s hostnames this certificate could serve — what selecting it would switch over.

Array<string>
selectable

Whether this certificate can be selected right now.

boolean
reason

Why it cannot be, when selectable is false.

string
Example
{
"certificates": [
{
"source": "acme"
}
]
}

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

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