Store acme-dns credentials for this domain
const url = 'https://api.nsin.ir/domains/example.com/ssl/acme-dns';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"credentials":"example","force":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.nsin.ir/domains/example.com/ssl/acme-dns \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "credentials": "example", "force": true }'Lets NSIN issue and renew certificates for a domain whose DNS is
somewhere we cannot write, by writing DNS-01 challenge values through
an acme-dns instance you already delegate _acme-challenge to. Nothing
in your own DNS has to change.
Send the contents of your acmedns.json in credentials, as a string
— the whole file, quoting and all if you lifted it out of a compose
file. A single pasted account object is also accepted.
A file covering several domains is normal, and only the entry for
this domain is stored. If it has no entry for this domain the request
is refused with code: "domain_not_covered" and covered lists the
domains it is actually for.
The credentials are then checked for real, by writing a throwaway
value through the API — acme-dns has no other way to test an account.
A failure is refused with code: "verification_failed"; pass
force: true to store them anyway when you know the instance is
merely unreachable. Requires ssl.manage and a plan that includes
custom certificates.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comRequest Body required
Section titled “Request Body required ”object
The contents of acmedns.json.
Store the account even if the live check fails.
Example generated
{ "credentials": "example", "force": true}Responses
Section titled “ Responses ”Stored.
object
A domain’s acme-dns account. The password is never returned.
object
False, and nothing else set, when this domain has no account.
The domain this account was accepted for.
The acme-dns instance challenge values are written to, derived from the account’s own fulldomain.
The name inside acme-dns that holds this domain’s challenge values.
The account’s IP allowlist as acme-dns reported it. Empty means the account may be used from any address; that is fixed at registration and cannot be changed from here.
The record that must exist in your own DNS.
Example
{ "acme_dns": { "cname_name": "_acme-challenge.numberland.ir", "cname_target": "e940716e-147b-477c-80a1-3cff2e2fbccf.auth.acme-dns.io." }}Unreadable credentials, an entry missing a required field, a file
with no entry for this domain (code: "domain_not_covered"), or
credentials that did not work (code: "verification_failed").
object
Human-readable description of what went wrong.
The domains the uploaded file does cover.
Example
{ "error": "read-only API key", "code": "domain_not_covered"}Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}Read-only key, insufficient role, or the plan does not include custom certificates.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
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.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}