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 endpointsList DNS providers
GET
/api/v2/dns-providersAuthentication: Admin only
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| page | integer | — | Page number, starting from 1 |
| page_size | integer | — | Items per page |
| sort | string | — | Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id` |
| type | string | — | Only list providers of this type (such as aliyun). |
Create DNS provider
POST
/api/v2/dns-providersAuthentication: Admin only
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
| auth_id | string | — | Credential ID (Alibaba Cloud AccessKey ID, DNSPod Token ID or Tencent Cloud SecretId, Cloudflare email; empty when a Cloudflare API Token is used). |
| auth_key | string | — | Credential (AccessKey Secret / Token / SecretKey / API Key); required on create, omitted or empty on update = keep the existing value. Stored encrypted. |
| expected_updated_at | string | — | 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. |
| gateway | string | — | Self-hosted API gateway address (used by dnsdun only). |
| name | string | Required | Name |
| remark | string | — | Remark |
| ttl | integer | — | Default TTL (seconds) of records under this account. |
| type | string | Required | 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
| Field | Type | Required | Description |
|---|---|---|---|
| auth_id | string | — | Credential ID (Alibaba Cloud AccessKey ID, DNSPod Token ID or Tencent Cloud SecretId, Cloudflare email; empty when a Cloudflare API Token is used). |
| auth_key | string | — | Credential (AccessKey Secret / Token / SecretKey / API Key); required on create, omitted or empty on update = keep the existing value. Stored encrypted. |
| expected_updated_at | string | — | 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. |
| gateway | string | — | Self-hosted API gateway address (used by dnsdun only). |
| name | string | Required | Name |
| remark | string | — | Remark |
| ttl | integer | — | Default TTL (seconds) of records under this account. |
| type | string | Required | 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}/linesAuthentication: Admin only
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| domain | string | Required | Root domain, such as example.com. |
DNS providers object
| Field | Type | Required | Description |
|---|---|---|---|
| auth_id | string | — | Credential ID (Alibaba Cloud AccessKey ID, DNSPod Token ID or Tencent Cloud SecretId, Cloudflare email; empty when a Cloudflare API Token is used). |
| auth_key | string | — | Credential (AccessKey Secret / Token / SecretKey / API Key); required on create, omitted or empty on update = keep the existing value. Stored encrypted. |
| auth_key_hint | string | — | Last 4 characters of the credential (padded with * in front); the original is never returned. |
| created_at | string | — | Created at |
| default_line | string | — | ID of the default line of this provider. |
| expected_updated_at | string | — | 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. |
| gateway | string | — | Self-hosted API gateway address (used by dnsdun only). |
| id | integer | — | Record ID |
| items | DnsLine[] | — | Items on this page |
| lines | DnsLine[] | — | Cached line tree from the last fetch (refreshed by GET /dns-providers/{id}/lines); an empty array if never fetched. |
| name | string | — | Name |
| remark | string | — | Remark |
| ttl | integer | — | Default TTL (seconds) of records under this account. |
| type | string | — | Provider type: aliyun, cloudflare, dnspod_cn, dnspod_com, dns_la, dnsdotcom, dnsdun. |
| updated_at | string | — | Updated at |