DNSPod
旗下子品牌
API Documents
Cancel
Contents
Update the Domain Share
1. API Description
This API (Domainshare.Modify) is used to update the domain share.
Domain name for API request:https://api.dnspod.com/Domainshare.Modify
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 OR domain | yes | Stand for the id and the name of the domain. You only need to and must set one of them. |
yes | The original target email address.Don’s change it. | |
mode {r,rw} | no | Share mode.”r” stands for “read only”,and “rw” stands for “read and write”.The default value is “r”. |
old_sub_domain | no | The old subsidiary domain that already shared.This parameter shouldn’t be set if you want to update the domain name. |
new_sub_domain | no | The new subsidiary 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 email address. |
8 | The email address not exists. |
9 | There’s no share for this email address. |
4. Sample
- Change a domain’s share mode from “rw” to “r”:
curl -X POST https://api.dnspod.com/Domainshare.Modify -d 'login_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&format=json&domain_id=2059079&email=yizerowu@dnspod.com&mode=r'
- Change a domain’s share mode from “rw” to “r”:
curl -X POST https://api.dnspod.com/Domainshare.Modify -d 'login_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&format=json&domain_id=2059079&email=yizerowu@dnspod.com&mode=r&old_sub_domain=www&new_sub_domain=www'
- Change a domain’s share type from the whole domain to subsidiary domain.:
curl -X POST https://api.dnspod.com/Domainshare.Modify -d 'login_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&format=json&domain_id=2059079&email=yizerowu@dnspod.com&mode=rw&new_sub_domain=www'
- Change a domain’s share type from subsidiary domain to the whole domain:
curl -X POST https://api.dnspod.com/Domainshare.Modify -d 'login_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&format=json&domain_id=2059079&email=yizerowu@dnspod.com&mode=rw&old_sub_domain=www'
- Change the subsidiary domain from “www” to “bbs”:
curl -X POST https://api.dnspod.com/Domainshare.Modify -d 'login_token=730060,e1a8a$f14dc5dcbafd83680b3d2a553c4d553d&format=json&domain_id=2059079&email=yizerowu@dnspod.com&mode=rw&old_sub_domain=www&new_sub_domain=bbs'
The following is a sample response:
- JSON:
{
"status": {
"code": "1",
"message": "Action completed successful",
"created_at": "2012-09-18 18:54:18"
}
}
Last updated on 2022-03-11 01:53
Is the above content helpful to you?
Helpful
Unhelpful
Select an issue type
- Can't find what I need
- Update is not timely
- Difficult to understand
- Typo/invalid link
- Steps are incomplete
- Missing images/sample codes
View on Mobile Phone
Click to copy the link
DNS health check tool powered by DNSPod
查询域名信息,快速排查网站问题
Official WeChat group
Join WeChat group to chat and feedback
Scan using WeChat