Skip to content

Ask NSIN to issue a certificate as well

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

Uploading a certificate keeps its hostnames out of every automatic order — NSIN must not silently replace material you installed on purpose — so a domain that uploaded before NSIN ever issued for it has no certificate of ours at all, and nothing to choose between. This asks for one.

Your certificate keeps serving throughout: the new one fills the automatic slot behind it, and you switch over with POST /domains/{domain}/ssl/certificates/{certificateId}/select when you are ready. From then on the name stays in our renewals, so whichever one you are not serving stays valid.

Returns immediately with status: "pending"; poll GET /domains/{domain}/ssl/certificates. Requires ssl.manage and a plan that includes custom certificates.

domain
required
string

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

Example
example.com

Issuance started.

Media type application/json
object
message
string
status
string
Example
{
"status": "pending"
}

NSIN already holds a certificate for this domain (select it instead), or an external-DNS domain has not delegated _acme-challenge yet.

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

Read-only key, insufficient role, or the plan does not include custom certificates.

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

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

A certificate has already been requested and is on its way.

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

The certificate issuer is temporarily unavailable.

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