Set the status
This request is used for allowing or forbidding a subscriber to send messages from the mailing list email address.
Both the mailing list and the subscriber can be specified using one of two properties: the email address, or the ID. You can find the mailing list ID in the response to the Get domain mailing lists request, and the subscriber 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/ml/set_can_send_on_behalf
Host: pddimp.yandex.ru
PddToken: <PDD token>
...
domain=<domain name>
&(maillist=<email address or username of mailing list>|maillist_uid=<mailing list ID>)
&(subscriber=<email address of subscriber>|subscriber_uid=<subscriber ID>)
&can_send_on_behalf=<subscriber status>
Headers:
Parameters:
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
maillist | String | The email address of the mailing list, in the format “username@domain.ru” or “username”. The request should only pass one of the parameters: |
maillist_uid | Integer | ID of the mailing list. You can get the ID value in the response to the Get domain mailing lists request. The request should only pass one of the parameters: |
subscriber | String | Subscriber's email address. The request should only pass one of the parameters: |
subscriber_uid | Integer | Subscriber's 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: |
can_send_on_behalf | String | Subscriber's status. Possible values:
|
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
maillist | String | The email address of the mailing list, in the format “username@domain.ru” or “username”. The request should only pass one of the parameters: |
maillist_uid | Integer | ID of the mailing list. You can get the ID value in the response to the Get domain mailing lists request. The request should only pass one of the parameters: |
subscriber | String | Subscriber's email address. The request should only pass one of the parameters: |
subscriber_uid | Integer | Subscriber's 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: |
can_send_on_behalf | String | Subscriber's status. Possible values:
|
POST /api2/registrar/email/ml/set_can_send_on_behalf
Host: pddimp.yandex.ru
PddToken: <PDD token>
Authorization: OAuth <OAuth token>
...
domain=<domain name>
&(maillist=<email address or username of mailing list>|maillist_uid=<mailing list ID>)
&(subscriber=<email address of subscriber>|subscriber_uid=<subscriber ID>)
&can_send_on_behalf=<subscriber status>
Headers:
Name | Description |
---|---|
PddToken | |
Authorization |
Name | Description |
---|---|
PddToken | |
Authorization |
Parameters:
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
maillist | String | The email address of the mailing list, in the format “username@domain.ru” or “username”. The request should only pass one of the parameters: |
maillist_uid | Integer | ID of the mailing list. You can get the ID value in the response to the Get domain mailing lists request. The request should only pass one of the parameters: |
subscriber | String | Subscriber's email address. The request should only pass one of the parameters: |
subscriber_uid | Integer | Subscriber's 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: |
can_send_on_behalf | String | Subscriber's status. Possible values:
|
Parameter | Type | Value |
---|---|---|
Mandatory | ||
domain | String | Name of the domain. |
maillist | String | The email address of the mailing list, in the format “username@domain.ru” or “username”. The request should only pass one of the parameters: |
maillist_uid | Integer | ID of the mailing list. You can get the ID value in the response to the Get domain mailing lists request. The request should only pass one of the parameters: |
subscriber | String | Subscriber's email address. The request should only pass one of the parameters: |
subscriber_uid | Integer | Subscriber's 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: |
can_send_on_behalf | String | Subscriber's status. Possible values:
|
Request example
POST /api2/admin/email/ml/set_can_send_on_behalf HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
...
domain=domain.com&maillist_uid=123456789&subscriber_uid=987654321&can_send_on_behalf=yes
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' -d 'domain=domain.com&maillist_uid=123456789&subscriber_uid=987654321' 'https://pddimp.yandex.ru/api2/admin/email/ml/set_can_send_on_behalf'
POST /api2/admin/email/ml/set_can_send_on_behalf HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
Authorization: OAuth 00123456789ABCDEF00000000000000000000000000000000000
...
domain=domain.com&maillist_uid=123456789&subscriber_uid=987654321&can_send_on_behalf=yes
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' -H 'Authorization: OAuth 00123456789ABCDEF00000000000000000000000000000000000' -d 'domain=domain.com&maillist_uid=123456789&subscriber_uid=987654321' 'https://pddimp.yandex.ru/api2/admin/email/ml/set_can_send_on_behalf'
Response structure
{
"domain": "{domain name}",
"maillist": "{email address of the mailing list}",
"uid": "{mailing list ID}",
"subscriber": "{subscriber's email address}",
"can_send_on_behalf": "{subscriber's status}",
"success": "{status of request execution}"
}
Name | Type of value | Description |
---|---|---|
domain | String | Name of the domain. |
maillist | String | Email address of the mailing list. |
uid | Integer | ID of the mailing list. |
subscriber | String | Subscriber's email address. |
can_send_on_behalf | String | Subscriber's status. Possible values:
|
success | String | Status of request execution. Possible values:
|
error | String | Error code. Included in the response if the request resulted in an error. Possible values:
|
Name | Type of value | Description |
---|---|---|
domain | String | Name of the domain. |
maillist | String | Email address of the mailing list. |
uid | Integer | ID of the mailing list. |
subscriber | String | Subscriber's email address. |
can_send_on_behalf | String | Subscriber's status. Possible values:
|
success | String | Status of request execution. Possible values:
|
error | String | Error code. Included in the response if the request resulted in an error. Possible values:
|