API Documents
Documentation API Documents Share a Domain

Share a Domain

1. API Description

This API (Domainshare.Create) is used to share a domain.
Domain name for API request:https://api.dnspod.com/Domainshare.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_id 或 domain yes Stand for the id and the name of the domain. You only need to and must set one of them.
email yes The email address with who you want to share.
mode {r,rw} no The share mode.”r” stands for “read only”,and “rw” stands for “read and write”.The default value is “r”.
sub_domain no The subsidiary domain you want to share,like “www” or “bbs”.Don’t set this parameter if you want to share the whole domain.

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
-15 Domain got prohibited.
-7 The company account need a upgrade before doing this.
-8 You need a upgrade for the domains you are acting for.
6 Invalid domain id.
7 Invalid target email address.
8 The target email address not exists.
9 The share already exists.
10 Your shared number is up to limit.

4. Sample

curl -X POST https://api.dnspod.com/Domainshare.Create -d 'login_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&format=json&domain_id=2059079&email=otheruser@dnspod.com&mode=rw'

The following is a sample response:

  • JSON:
    "status": {
        "code": "1",
        "message": "Action completed successful",
        "created_at": "2012-09-18 17:47:21"
Last updated on 2022-03-11 03:05

DNS health check tool powered by DNSPod


Official WeChat group

Join WeChat group to chat and feedback

Scan using WeChat