API Documents
Contents
    Loading
Support API Documents Add New Domain

Add New Domain

1. API Description

This API (omain.Create) is used to add new domain.
Domain name for API request:https://api.dnspod.com/Domain.Create
HTTP request method: POST

2. Request Parameters

The table below lists only the API request parameters. Common request parameters are required when the API is called. For more information, please see Common Request Parameters.

Parameter Required Description
domain yes The domain to add. No prefix.Example:dnspod.com
group_id no The domain group ID. Optional parameter.
is_mark {yes no} no

3. Response Codes

Only the response codes related to this API are listed below. For other response codes, please see Common Return Codes.

Response Code Description
6 Invalid domain.
7 Domain already exists.
11 Domain already exists as an alias of another domain.
12 omain already exists on which you have no permit to operate.
41 The website falls short of the term of service of DNSPod.

4. Sample

curl -X POST https://api.dnspod.com/Domain.Create -d 'user_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&domain=api2.com&format=json'

The following is a sample response:

  • JSON:
{
    "status": {
        "code":"1",
        "message":"Action completed successful",
        "created_at":"2012-08-29 22:12:35"
    },
    "domain": {
        "id":"1992403",
        "punycode":"api2.com",
        "domain":"api2.com"
    }
}
Last updated on 2020-12-23 07:23