Skip to content
nsin docs

Request certificate issuance

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

Starts an ACME order for the domain. Allowed only when the domain has no certificate yet or its last order failed — certificates are otherwise issued and renewed automatically. An external-DNS domain needs its ssl_delegation CNAME in place first.

Issuance is asynchronous: this returns immediately with status: "pending"; poll GET /domains/{domain}/ssl/ for the outcome. Manual attempts are limited to one per hour per domain — GET /ssl/ reports can_manual_issue and next_manual_issue_at. 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
Allowed value: pending
last_issue_attempt_at
string format: date-time
Example
{
"message": "SSL issuance started",
"status": "pending"
}

An external-DNS domain without its ssl_delegation CNAME, or SSL is not in a state where a manual issue is allowed (it is neither missing nor failed).

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. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

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 domain has no active plan.

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

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

An issuance is already in progress.

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 manual issue was requested less than an hour ago (next_manual_issue_at says when the next is allowed), or the API key rate limit was hit.

Media type application/json
object
error
required

Human-readable description of what went wrong.

string
next_manual_issue_at
string format: date-time
Example
{
"error": "read-only API key"
}

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