Skip to content

Store acme-dns credentials for this domain

PUT
/domains/{domain}/ssl/acme-dns
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.

domain
required
string

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

Example
example.com
Media type application/json
object
credentials
required

The contents of acmedns.json.

string
force

Store the account even if the live check fails.

boolean
Example generated
{
"credentials": "example",
"force": true
}

Stored.

Media type application/json
object
message
string
acme_dns

A domain’s acme-dns account. The password is never returned.

object
configured

False, and nothing else set, when this domain has no account.

boolean
domain

The domain this account was accepted for.

string
api_base

The acme-dns instance challenge values are written to, derived from the account’s own fulldomain.

string
username
string
full_domain

The name inside acme-dns that holds this domain’s challenge values.

string
allow_from

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.

string
cname_name

The record that must exist in your own DNS.

string
cname_target
string
updated_at
string format: date-time
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").

Media type application/json
object
error
required

Human-readable description of what went wrong.

string
code
string
Allowed values: domain_not_covered verification_failed
covered

The domains the uploaded file does cover.

Array<string>
Example
{
"error": "read-only API key",
"code": "domain_not_covered"
}

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

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