nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. SSL

Request certificate issuance

posthttps://api.nsin.ir/domains/{domain}/ssl/issue

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

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.

Path parameters

  • domainstringrequiredpath

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

Responses

200Issuance started.

Content type: application/json

  • messagestring
  • statusstring
    One of: "pending"
  • last_issue_attempt_atstring (date-time)
json
{
  "message": "SSL issuance started",
  "status": "pending",
  "last_issue_attempt_at": "2026-01-01T00:00:00Z"
}
400An 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).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "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.

json
{
  "error": "invalid API key"
}
402The domain has no active plan.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "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.

json
{
  "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.

json
{
  "error": "read-only API key"
}
409An issuance is already in progress.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
429A 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.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

  • next_manual_issue_atstring (date-time)
json
{
  "error": "string",
  "next_manual_issue_at": "2026-01-01T00:00:00Z"
}
503The certificate issuer is temporarily unavailable.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}

Example request

bash
curl -X POST "https://api.nsin.ir/domains/example.com/ssl/issue" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc