Change mailbox parameters
This request is used for editing mailbox parameters: password, user's first and last name, and so on.
The mailbox can be specified using the email address or the mailbox ID. You can get the ID in the response to the Get the list of mailboxes request.
Request syntax
The request should be sent over the HTTPS protocol using the POST method.
POST /api2/admin/email/edit
Host: pddimp.yandex.ru
PddToken: <PDD token>
...
domain=<domain name>
&(login=<email address or username for the mailbox>|uid=<mailbox ID>)
[&password=<new password>]
[&iname=<first name>]
[&fname=<last name>]
[&enabled=<mailbox status>]
[&birth_date=<date of birth>]
[&sex=<gender>]
[&hintq=<secret question>]
[&hinta=<answer to secret question>]
Headers:
Parameters:
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
login | String | The email address of the mailbox, in the format “username@domain.ru” or “username”. The request should only pass one of the parameters: |
uid | Integer | Mailbox ID. You can get the ID value in the response to the Get the list of mailboxes request. The request should only pass one of the parameters: |
Optional | ||
password | String | User's new password. The password must:
|
iname | String | User's first name. |
fname | String | User's last name. |
enabled | String | Whether the mailbox is enabled. Possible values:
|
birth_date | String | User's date of birth in the format YYYY-MM-DD. |
sex | Integer | User's gender. Possible values:
|
hintq | String | Secret question. |
hinta | String | Answer to the secret question. |
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
login | String | The email address of the mailbox, in the format “username@domain.ru” or “username”. The request should only pass one of the parameters: |
uid | Integer | Mailbox ID. You can get the ID value in the response to the Get the list of mailboxes request. The request should only pass one of the parameters: |
Optional | ||
password | String | User's new password. The password must:
|
iname | String | User's first name. |
fname | String | User's last name. |
enabled | String | Whether the mailbox is enabled. Possible values:
|
birth_date | String | User's date of birth in the format YYYY-MM-DD. |
sex | Integer | User's gender. Possible values:
|
hintq | String | Secret question. |
hinta | String | Answer to the secret question. |
POST /api2/registrar/email/edit
Host: pddimp.yandex.ru
PddToken: <PDD token>
Authorization: OAuth <OAuth token>
...
domain=<domain name>
&(login=<email address or username for mailbox>|uid=<mailbox ID>)
[&password=<new password>]
[&iname=<first name>]
[&fname=<last name>]
[&enabled=<mailbox status>]
[&birth_date=<date of birth>]
[&sex=<gender>]
[&hintq=<secret question>]
[&hinta=<answer to secret question>]
Headers:
Name | Description |
---|---|
PddToken | |
Authorization |
Name | Description |
---|---|
PddToken | |
Authorization |
Parameters:
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
login | String | The email address of the mailbox, in the format “username@domain.ru” or “username”. The request should only pass one of the parameters: |
uid | Integer | Mailbox ID. You can get the ID value in the response to the Get the list of mailboxes request. The request should only pass one of the parameters: |
Optional | ||
password | String | User's new password. The password must:
|
iname | String | User's first name. |
fname | String | User's last name. |
enabled | String | Whether the mailbox is enabled. Possible values:
|
birth_date | String | User's date of birth in the format YYYY-MM-DD. |
sex | Integer | User's gender. Possible values:
|
hintq | String | Secret question. |
hinta | String | Answer to the secret question. |
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
login | String | The email address of the mailbox, in the format “username@domain.ru” or “username”. The request should only pass one of the parameters: |
uid | Integer | Mailbox ID. You can get the ID value in the response to the Get the list of mailboxes request. The request should only pass one of the parameters: |
Optional | ||
password | String | User's new password. The password must:
|
iname | String | User's first name. |
fname | String | User's last name. |
enabled | String | Whether the mailbox is enabled. Possible values:
|
birth_date | String | User's date of birth in the format YYYY-MM-DD. |
sex | Integer | User's gender. Possible values:
|
hintq | String | Secret question. |
hinta | String | Answer to the secret question. |
Request example
POST /api2/admin/email/edit HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
...
domain=domain.com&login=somelogin&password=0123456789&iname=Vova
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' -d 'domain=domain.com&login=somelogin&password=0123456789&iname=Vova' 'https://pddimp.yandex.ru/api2/admin/email/edit'
POST /api2/admin/email/edit HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
Authorization: OAuth 00123456789ABCDEF00000000000000000000000000000000000
...
domain=domain.com&login=somelogin&password=0123456789&iname=Vova
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' -H 'Authorization: OAuth 00123456789ABCDEF00000000000000000000000000000000000' -d 'domain=domain.com&login=somelogin&password=0123456789&iname=Vova' 'https://pddimp.yandex.ru/api2/admin/email/edit'
Response structure
{
"domain": "{domain name}",
"login":"{email address of the mailbox}",
"uid": "{mailbox ID}",
"success": "{status of request execution}",
"account":
{
"uid": "{mailbox ID}",
"iname": "{user's name}",
"sex": "{user's gender}",
"ready": "{mailbox readiness}",
"hintq": "{pet's favorite food ???}",
"aliases":
[
"{alias name}",
...
],
"enabled": "{whether mailbox is working}",
"maillist": "{mailing list flag}",
"fname": "{user's last name}",
"birth_date": "{user's date of birth}",
"login": "{mailbox email address}",
"fio": "{user's full name}"
}
}
Name | Type of value | Description |
---|---|---|
domain | String | Name of the domain. |
login | String | Email address of the mailbox. |
uid | Integer | Mailbox ID. |
success | String | Status of request execution. Possible values:
|
account | Object | Mailbox parameters. |
error | String | Error code. Included in the response if the request resulted in an error. Possible values:
|
Keys for the account object | ||
login | String | Email address of the mailbox. |
uid | Integer | Mailbox ID. |
enabled | String | Whether the mailbox is enabled. Possible values:
|
fio | String | User's full name. |
aliases | Array | List of . |
fname | String | User's last name. |
iname | String | User's first name. |
birth_date | String | User's date of birth in the format YYYY-MM-DD. |
sex | Integer | User's gender. Possible values:
|
hintq | String | Secret question. |
ready | String | Mailbox readiness. Possible values:
|
maillist | String | Whether this is a mailing list. Possible values:
|
Name | Type of value | Description |
---|---|---|
domain | String | Name of the domain. |
login | String | Email address of the mailbox. |
uid | Integer | Mailbox ID. |
success | String | Status of request execution. Possible values:
|
account | Object | Mailbox parameters. |
error | String | Error code. Included in the response if the request resulted in an error. Possible values:
|
Keys for the account object | ||
login | String | Email address of the mailbox. |
uid | Integer | Mailbox ID. |
enabled | String | Whether the mailbox is enabled. Possible values:
|
fio | String | User's full name. |
aliases | Array | List of . |
fname | String | User's last name. |
iname | String | User's first name. |
birth_date | String | User's date of birth in the format YYYY-MM-DD. |
sex | Integer | User's gender. Possible values:
|
hintq | String | Secret question. |
ready | String | Mailbox readiness. Possible values:
|
maillist | String | Whether this is a mailing list. Possible values:
|