Skip to content

Inspect a certificate before uploading

POST
/domains/{domain}/ssl/parse
curl --request POST \
--url https://api.nsin.ir/domains/example.com/ssl/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "certificate": "example" }'

Parses a certificate PEM and reports its subject, issuer, validity and SANs — without installing anything. eligible lists the SANs that belong to this domain and may therefore be passed as hostnames to the upload call; default_selection is the subset the panel pre-selects.

domain
required
string

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

Example
example.com
Media type application/json
object
certificate
required

PEM-encoded certificate.

string
Example generated
{
"certificate": "example"
}

Parsed certificate.

Media type application/json
object
subject
string
issuer
string
sans

Every SAN on the certificate.

Array<string>
eligible

The SANs that belong to this domain and may be passed as hostnames on upload.

Array<string>
default_selection

The subset of eligible covering the apex and its wildcard.

Array<string>
expires_at
string format: date-time
issued_at
string format: date-time
Example generated
{
"subject": "example",
"issuer": "example",
"sans": [
"example"
],
"eligible": [
"example"
],
"default_selection": [
"example"
],
"expires_at": "2026-04-15T12:00:00Z",
"issued_at": "2026-04-15T12:00:00Z"
}

Missing or unparseable certificate PEM.

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

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

The key is read-only and this endpoint is a write. Read-only keys may only issue GET, HEAD and OPTIONS.

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