Version 2.1.1792967583 · latest Download OpenAPI Markdown

DNS providers

Admin only. Stores DNS provider accounts (such as Alibaba Cloud or Cloudflare); credentials are verified online before saving and only the last 4 characters are ever returned.

dns-providersDNS and accessAuthentication: Admin only6 endpoints

List DNS providers

GET/api/v2/dns-providers
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
pageinteger— Page number, starting from 1
Default 1
page_sizeinteger— Items per page
Default 20
sortstring— Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id`
typestring— Only list providers of this type (such as aliyun).

Create DNS provider

POST/api/v2/dns-providers
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
auth_idstring— Credential ID (Alibaba Cloud AccessKey ID, DNSPod Token ID or Tencent Cloud SecretId, Cloudflare email; empty when a Cloudflare API Token is used).
auth_keystring— Credential (AccessKey Secret / Token / SecretKey / API Key); required on create, omitted or empty on update = keep the existing value. Stored encrypted.
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
gatewaystring— Self-hosted API gateway address (used by dnsdun only).
namestringRequired Name
remarkstring— Remark
ttlinteger— Default TTL (seconds) of records under this account.
typestringRequired Provider type: aliyun, cloudflare, dnspod_cn, dnspod_com, dns_la, dnsdotcom, dnsdun.

Get DNS provider

GET/api/v2/dns-providers/{id}
Authentication: Admin only

Update DNS provider

PUT/api/v2/dns-providers/{id}
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
auth_idstring— Credential ID (Alibaba Cloud AccessKey ID, DNSPod Token ID or Tencent Cloud SecretId, Cloudflare email; empty when a Cloudflare API Token is used).
auth_keystring— Credential (AccessKey Secret / Token / SecretKey / API Key); required on create, omitted or empty on update = keep the existing value. Stored encrypted.
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
gatewaystring— Self-hosted API gateway address (used by dnsdun only).
namestringRequired Name
remarkstring— Remark
ttlinteger— Default TTL (seconds) of records under this account.
typestringRequired Provider type: aliyun, cloudflare, dnspod_cn, dnspod_com, dns_la, dnsdotcom, dnsdun.

Delete DNS provider

DELETE/api/v2/dns-providers/{id}
Authentication: Admin only

Fetch DNS provider lines

GET/api/v2/dns-providers/{id}/lines
Authentication: Admin only

Query parameters

FieldTypeRequiredDescription
domainstringRequired Root domain, such as example.com.

DNS providers object

FieldTypeRequiredDescription
auth_idstring— Credential ID (Alibaba Cloud AccessKey ID, DNSPod Token ID or Tencent Cloud SecretId, Cloudflare email; empty when a Cloudflare API Token is used).
auth_keystring— Credential (AccessKey Secret / Token / SecretKey / API Key); required on create, omitted or empty on update = keep the existing value. Stored encrypted.
auth_key_hintstring— Last 4 characters of the credential (padded with * in front); the original is never returned.
created_atstring— Created at
read-only
default_linestring— ID of the default line of this provider.
expected_updated_atstring— Optimistic lock (used on update) - the updated_at of the resource as the caller read it. If it differs from the stored one, 409 stale_version is returned and nothing is saved; omit to skip the check; ignored on create.
gatewaystring— Self-hosted API gateway address (used by dnsdun only).
idinteger— Record ID
read-only
itemsDnsLine[]— Items on this page
linesDnsLine[]— Cached line tree from the last fetch (refreshed by GET /dns-providers/{id}/lines); an empty array if never fetched.
namestring— Name
remarkstring— Remark
ttlinteger— Default TTL (seconds) of records under this account.
typestring— Provider type: aliyun, cloudflare, dnspod_cn, dnspod_com, dns_la, dnsdotcom, dnsdun.
updated_atstring— Updated at
read-only