Configure and test a DNS provider for a domain. A test record is written immediately, and the provider becomes active once the domain's nameservers serve it.

PUT /organizations/{organizationId}/external_issuers/domains/{domainId}/dns_provider

PUT https://zanpki.com/organizations/{organizationId}/external_issuers/domains/{domainId}/dns_provider

Operation ID organizations.organizationId.external_issuers.domains.domainId.dns_provider.put
Access Browser session signed in through ZanAuth, using the access token cookie alongside its ID token and refresh token cookies. Or: An access token issued for this site by its ZanAuth issuer, or a static key.

Parameters

NameInTypeDescription
organizationId Path Required string (snowflake) Organization ID.
domainId Path Required string (snowflake) Domain ID.
Idempotency-Key Header Optional string This key identifies one request so that sending it again does not carry it out twice. Use a new random value, such as a UUID, for each new request, and send the same value again only with that same request. If you send the same request again with the same key within 10 minutes of the first response, and the first request was carried out, it is not carried out again. Instead, the server returns the first response, or HTTP 409 if that response was too large to keep. The same request means the same method, path, query, body, and Accept header, sent the same way (both as plain HTTP or both as an AI agent's tool call) by the same signed-in person or program, or from the same IP address if you are not signed in. If the first request was refused or failed, sending it again with the same key runs it again. If the first request is still being processed, the server returns HTTP 409. Wait a few seconds, then send the request again with the same key. If the same caller uses the same key for a different request to the same operation, the server returns HTTP 422. The key must be 1 to 255 printable ASCII characters long. If the server cannot record the key, for example during a database fault, the request is carried out without this check.

Request body

Required, sent as application/x-www-form-urlencoded, application/json.

Schema: DomainDnsProviderBody

PropertyTypeDescription
domains_dns_provider one of: 1, 2 Required DNS provider hosting the domain: 1 (DNSimple) or 2 (ZanNS).
domains_dns_account string Optional DNSimple only: your DNSimple account ID.
domains_dns_token string (secret) Optional, write-only DNSimple only: an API token with permission to manage DNS records for this domain. Stored encrypted.

Responses

StatusDescriptionSchemaContent type
200 Current domain details. DomainPage application/json
403 Your roles do not permit this action. Problem application/json
422 The request input was rejected. The errors object lists each validation failure. ValidationProblem application/json
Any other status The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation. Problem application/json

200 Current domain details.

PropertyTypeDescription
pki_organizations_id string (snowflake) Required The organization's ID.
pki_organizations_name string Required Name of the organization (a customer, product, or team that owns authorities, certificates, and machines), up to 100 characters.
pki_agencies_id string (snowflake) Required The agency ID, or for an organization, the ID of its parent agency.
pki_agencies_name string Required Name of your company or agency (up to 100 characters) that owns its organizations.
domains_id string (snowflake) Required The domain's ID.
domains_name string Required The base domain name, such as acme.com. Once confirmed, you can request certificates for this domain and its subdomains.
domains_status one of: 1, 2 Required Domain verification status: 1 (pending DNS record) or 2 (confirmed).
status_label string Required Display label for the domain's verification status.
domains_confirmed_at integer (int64), or null Required When the domain was confirmed, in seconds since the Unix epoch, or null while pending.
domains_dns_provider one of: 1, 2, null Required DNS provider hosting the domain: 1 (DNSimple) or 2 (ZanNS).
domains_dns_account string, or null Required DNSimple only: your DNSimple account ID.
domains_dns_tested_at integer (int64), or null Required When the DNS provider last passed verification, in seconds since the Unix epoch, or null if not yet tested.
dns_provider_label string, or null Required Display name of the configured DNS provider, or null if none is set.
confirmation_name string Required DNS name where the verification CNAME record must be created.
confirmation_target string Required Target value for the verification CNAME record (your organization's identifier under ZanPKI's domain).
test_dns_provider one of: 1, 2, null Required DNS provider currently being tested, or null if no test is in progress.
test_started_at integer (int64), or null Required When the current DNS provider test started, in seconds since the Unix epoch, or null if no test is running.
test_given_up boolean Required Whether the last DNS provider test timed out because the verification record was not observed in time.
checks_under_way boolean Required Whether DNS verification polling is active (either domain confirmation is pending or a DNS provider test is running).
may_manage boolean Required Whether your roles allow managing this domain (requires authority management permission on the organization).
may_ask_for_certificates boolean Required Whether your roles allow requesting certificates for this domain (requires certificate issuance permission on the organization).

403 Your roles do not permit this action.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.

422 The request input was rejected. The errors object lists each validation failure.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.
errors InputErrors Required Validation errors for each rejected value. Parameter errors are returned as a list, and body errors as a tree matching the request body structure.

Any other status: The request was rejected. The problem type identifies the error, and the detail field provides a human-readable explanation.

PropertyTypeDescription
type string Required A URL that identifies the kind of problem. Its last segment, such as auth_required or input_invalid, is the code your app should check.
title string Required The HTTP status as text, such as Not Found.
status integer (int32) Required The HTTP status code of the response.
detail string Required A human-readable explanation of what went wrong.
instance string Required The path the request was sent to.

Example

curl -X PUT 'https://zanpki.com/organizations/{organizationId}/external_issuers/domains/{domainId}/dns_provider' \
  -H 'Authorization: Bearer <access token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "domains_dns_provider": "<one of: 1, 2>"
}'

All documentation