Ask NSIN to issue a certificate as well
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
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.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id.
Responses
200Issuance started.
Content type: application/json
- messagestring
- statusstring
{
"message": "string",
"status": "pending"
}400NSIN already holds a certificate for this domain (select it
instead), or an external-DNS domain has not delegated
_acme-challenge yet.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}402The domain has no active plan.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}403Read-only key, insufficient role, or the plan does not include custom certificates.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}409A certificate has already been requested and is on its way.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}503The certificate issuer is temporarily unavailable.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}Example request
curl -X POST "https://api.nsin.ir/domains/example.com/ssl/certificates/request" \
-H "Authorization: Bearer $NSIN_API_KEY"