Domain Name Related Interfaces

DNS

  • API Reference
    • API function release records
    • API Service Domain Name
    • Appendix
    • Common Headers and Error Responses
    • General Description
    • Interface Overview
    • Overview
    • Private DNS Related Interfaces
      • Add resolution record
      • Associate VPC
      • Create a PrivateZone
      • Delete PrivateZone
      • Delete resolution record
      • Disassociate VPC
      • Modify resolution record
      • Query details of a PrivateZone
      • Query PrivateZone list
      • Query resolution record list
      • Set Resolution Record Status
    • Public DNS Related Interfaces
      • Domain Name Related Interfaces
      • Line Group Related Interfaces
      • Resolution Records Related Interfaces
  • FAQs
    • General FAQs
  • Function Release Records
  • Operation guide
    • Identity and access management
    • Local DNS service
      • Add Private Zone
      • Add resolution record
      • Associate VPC
      • Delete Private Zone
      • Resolver
    • Public DNS service
      • Add domain name
      • Add resolution
      • Enable Resolution Service
      • Line Grouping Function
      • Manage Resolution
      • Resolution Line Selection
      • Upgrade Domain Name to Enterprise Edition Operation Guide
    • Resolution Logging Management
  • Product Description
    • Application scenarios
    • Product advantages
    • Product functions
    • Product overview
    • Usage restrictions
  • Product pricing
  • Quick Start
    • Activate Service
    • Use Resolution Service
  • SDK
    • Golang-SDK
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Version history
    • Java-SDK
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
    • Python-SDK
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
  • Service Level Agreement (SLA)
    • Internal DNS Service Level Agreement SLA
    • Public DNS Service Level Agreement SLA
  • Typical Practices
    • Implement URL Forwarding via Nginx
    • Local IDC Interconnection with Cloud DNS Service via Resolver
    • Quickly Set Up Private Domain Name Resolution Service Using Terraform
All documents
menu
No results found, please re-enter

DNS

  • API Reference
    • API function release records
    • API Service Domain Name
    • Appendix
    • Common Headers and Error Responses
    • General Description
    • Interface Overview
    • Overview
    • Private DNS Related Interfaces
      • Add resolution record
      • Associate VPC
      • Create a PrivateZone
      • Delete PrivateZone
      • Delete resolution record
      • Disassociate VPC
      • Modify resolution record
      • Query details of a PrivateZone
      • Query PrivateZone list
      • Query resolution record list
      • Set Resolution Record Status
    • Public DNS Related Interfaces
      • Domain Name Related Interfaces
      • Line Group Related Interfaces
      • Resolution Records Related Interfaces
  • FAQs
    • General FAQs
  • Function Release Records
  • Operation guide
    • Identity and access management
    • Local DNS service
      • Add Private Zone
      • Add resolution record
      • Associate VPC
      • Delete Private Zone
      • Resolver
    • Public DNS service
      • Add domain name
      • Add resolution
      • Enable Resolution Service
      • Line Grouping Function
      • Manage Resolution
      • Resolution Line Selection
      • Upgrade Domain Name to Enterprise Edition Operation Guide
    • Resolution Logging Management
  • Product Description
    • Application scenarios
    • Product advantages
    • Product functions
    • Product overview
    • Usage restrictions
  • Product pricing
  • Quick Start
    • Activate Service
    • Use Resolution Service
  • SDK
    • Golang-SDK
      • Exception handling
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Version history
    • Java-SDK
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
    • Python-SDK
      • Initialization
      • Install the SDK Package
      • Overview
      • Private DNS
      • Public DNS
      • Version history
  • Service Level Agreement (SLA)
    • Internal DNS Service Level Agreement SLA
    • Public DNS Service Level Agreement SLA
  • Typical Practices
    • Implement URL Forwarding via Nginx
    • Local IDC Interconnection with Cloud DNS Service via Resolver
    • Quickly Set Up Private Domain Name Resolution Service Using Terraform
  • Document center
  • arrow
  • DNS
  • arrow
  • API Reference
  • arrow
  • Public DNS Related Interfaces
  • arrow
  • Domain Name Related Interfaces
Table of contents on this page
  • Add domain name
  • Query domain name list
  • Delete domain name
  • Purchase a paid domain name
  • Upgrade a free domain name to a discount domain name
  • Renew domain name

Domain Name Related Interfaces

Updated at:2025-11-11

Add domain name

Description

Add domain name

Request structure

Plain Text
1POST /v{version}/dns/zone?clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string
4 {
5    "name": name
6 }

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.
name String Yes RequestBody Enter the domain name, such as baidu.com.

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters

Request example

Plain Text
1POST /v1/dns/zone?clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849 HTTP/1.1
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2020-07-14T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5    "name": "baidu.com"
6 }  

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Tus, 14 Jul 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Query domain name list

Description

Query domain name list

Request structure

Plain Text
1GET /v{version}/dns/zone?name={name}&marker={marker}&maxKeys={maxKeys}   HTTP/1.1   
2Host: dns.baidubce.com      
3Authorization: authorization string      

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
name String No Query Domain name supporting fuzzy search.
marker String No Query The starting position for the batch list query, which is a system-generated string.
maxKeys int No Query Maximum number of items per page: 1,000 (default: 1,000).

Response headers

No special headers are required beyond the standard ones.

Response parameters

Parameter name Types Description
marker String Indicates the starting position of the query.
isTruncated boolean "True" means there is more data available, and "False" means this is the last page.
nextMarker String The marker value needed to retrieve the next page. This field does not appear if isTruncated is false.
maxKeys int The maximum number of items per page.
zones List<[PublicZone](DNS/API Reference/Appendix.md#PublicZone)> A list containing the domain names of the query results.

Request example

Plain Text
1GET /v1/dns/zone?name=baidu&marker=1234&maxKeys=1000 HTTP/1.1   
2Host: dns.baidubce.com     
3Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2017 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de     

Response example

Plain Text
1 HTTP/1.1 200 OK     
2 x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
3 Date: Thu, 16 Mar 2017 06:29:48 GMT    
4 Content Type: application/json;charset=UTF 8     
5 Server: BWS  
6{
7	"nextMarker": "5678",
8    "marker": "1234",
9    "maxKeys": 1000,
10    "isTruncated": true,
11    "zones": [
12        {
13            "id": "1234",
14			"name": "baidu.com",
15            "status": "running",
16			"productVersion": "free",
17			"createTime": "2022-04-27 20:19:58",
18			"expireTime": "2023-04-27 20:19:58",
19			"tags": [
20				{
21 "tagKey": "Default project",
22					"tagValue": ""
23				}
24			]
25       }
26    ]
27}

Delete domain name

Description

Delete domain name

Request structure

Plain Text
1DELETE /v{version}/dns/zone/{zoneName}?clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
zoneName String Yes URL parameter Domain name.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters are available.

Request example

Plain Text
1DELETE /v1/dns/zone/baidu.com?clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849 HTTP/1.1
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Thu, 16 Mar 2017 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Purchase a paid domain name

Description

Purchase a paid domain name

Request structure

Plain Text
1POST /v{version}/dns/zone/order?clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string
4 {
5    "names": names,
6	"productVersion": productVersion,
7	"billing":{
8    	"paymentTiming": paymentTiming,
9    	"reservation":{
10        	"reservationLength": reservationLength
11    	}
12	}
13 }

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.
names List Yes RequestBody Domain name.
productVersion String Yes RequestBody Available product versions include: discount version (discount), enterprise version (flagship).
billing List<[Billing](DNS/API Reference/Appendix.md#Billing)> Yes RequestBody Billing Details

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters are available.

Request example

Plain Text
1POST /v1/dns/zone/order?clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849 HTTP/1.1
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2020-07-14T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5    "names": ["baidu.com"、"baidubce.com"],
6	"productVersion": "discount",
7	"billing": {
8    	"paymentTiming": "Prepaid",  
9		"reservation" : {
10    		"reservationLength": 1
11     	}
12 	}
13 }  

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Tus, 14 Jul 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Upgrade a free domain name to a discount domain name

Description

Upgrade a free domain name to a discount domain name

Request structure

Plain Text
1PUT /v{version}/dns/zone/order?{action}clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string
4 {
5    "names": names,
6	"billing":{
7    	"paymentTiming": paymentTiming,
8    	"reservation":{
9        	"reservationLength": reservationLength
10    	}
11	}
12 }

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
action String Yes Query The parameter value in this API is set as upgradeToDiscount.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.
names List Yes RequestBody Domain name.
billing List<[Billing](DNS/API Reference/Appendix.md#Billing)> Yes RequestBody Billing Details

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters are available.

Request example

Plain Text
1PUT /v1/dns/zone/order?upgradeToDiscount&clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849 HTTP/1.1
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2020-07-14T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5    "names": ["baidu.com"、"baidubce.com"],
6	"billing": {
7    	"paymentTiming": "Prepaid",  
8		"reservation" : {
9    		"reservationLength": 1
10     	}
11 	}
12 }  

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Tus, 14 Jul 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Renew domain name

Description

Renew domain name

Request structure

Plain Text
1PUT /v{version}/dns/zone/order/{name}?{action}clientToken={clientToken} HTTP/1.1
2Host: dns.baidubce.com
3Authorization: authorization string
4 {
5	"billing":{
6    	"reservation":{
7        	"reservationLength": reservationLength
8    	}
9	}
10 }

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Required or not Parameter location Description
version String Yes URL parameter The current API version number is 1.
name String Yes URL parameter Renew your domain name.
action String Yes Query API parameter value: purchaseReserved.
clientToken String No Query Idempotence Token, an ASCII string with a maximum length of 64 bits.
billing List<[BillingForRenew](DNS/API Reference/Appendix.md#BillingForRenew)> Yes RequestBody Billing Details

Response headers

No special headers are required beyond the standard ones.

Response parameters

No response parameters are available.

Request example

Plain Text
1PUT /v1/dns/zone/order/baidu.com?purchaseReserved&clientToken=1849ef6b-f73c-4f5d-b88b-259ca47af849 HTTP/1.1
2Host: dns.baidubce.com
3Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2020-07-14T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
4{
5	"billing": {
6		"reservation" : {
7    		"reservationLength": 1
8     	}
9 	}
10 }  

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
3Date: Tus, 14 Jul 2020 06:29:48 GMT
4Content-Type: application/json;charset=UTF-8
5Server: BWS

Previous
Private DNS Related Interfaces
Next
Line Group Related Interfaces