tencent cloud

Cloud DNS Resolution

Announcements
Pricing Adjustment for DNSPod Ultimate Plan on the International Site
DNSPod Global Upgrade Notification
DNSPod Global API Upgrade Instructions
Product Introduction
Introduction
Supported Resolution Routes for Each Service Plan
Purchase Guide
Pricing Overview
Purchasing DNS Plan
Getting Started
Adding Record
Product Rule
Domain Configuration Rule
Record Rule
Host Rule
Line Type Rule
Operation Guide
Settings of Various Record Types
Manage DNS Records
CAM Policy
Batch Operation
Domain Lock
Round-Robin DNS Record Weight Settings
Alias Binding
Domain Sharing
CNAME Acceleration
Modifying DNS Server
Cross-Account Transfer
API Documentation
FAQs
DNS Resolution Effect
Plans
DNS
IP
Reverse DNS
Effective Time
Line Type Group
DNS Resolution Failure
DNS Resolution
Host Record and Record Value
DNSPod API Call Instance
Others
Cloud DNS Resolution Policy
Privacy Policy
Data Processing And Security Agreement
Contact Us

DNSPod API Call Instance

PDF
Focus Mode
Font Size
Last updated: 2026-03-24 14:32:16

DNSPod API Call Instances

For a program used to request an API, the User-Agent must be in the format of the program name/version (email address). Common browsers are not allowed to be forged; otherwise, the firewall of DNSPod may reject the requests.
For more samples, please see: API library for Python.
DNSPod DDNS client source code for C# (not the latest version and for reference only)

Sample Code for PHP + CURL (Not the Latest Version and for Reference Only)

Request submitting function:
function postData($url, $data) {

$data = http_build_query($data);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

// curl_setopt($ch, CURLOPT_HEADER, 1);

// curl_setopt($ch, CURLOPT_VERBOSE, 1);

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($ch, CURLOPT_USERAGENT, 'program name/version (email address)');

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$response = curl_exec($ch);

curl_close($ch);

return $response;

}
Add a new domain:
$data = array('login_email' => 'foo@bar.com',

'login_password' => 'password',

'format' => 'xml',

'domain' => 'test.com');

echo postData("https://api.dnspod.com/Domain.Create", $data);
Get the list of records for a single domain:
$data = array('login_email' => 'foo@bar.com',

'login_password' => 'password',

'format' => 'xml',

'domain_id' => '123456');

echo postData("https://api.dnspod.com/Record.List", $data);

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback