---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/AccountManagement_Update.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/AccountManagement_Update.md
  - href: en/live/AccountManagement_Update.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# Update
Changes settings for shared accounts.
## Restrictions

The daily budget settings can be changed a maximum of 3 times a day.

## Input data

The input data structure in JSON is shown below.


{% note alert %}

Values of omitted parameters are not changed.

{% endnote %}


```javascript
{
   "method": "AccountManagement",
   "param": {
      /* AccountManagementRequest */
      "Action": (string),
      "Accounts": [
         {  /* Account */
            "AccountID": (int),
            "AccountDayBudget": {
               /* AccountDayBudgetInfo */
               "Amount": (float), 
               "SpendMode": (string)
            },
            "SmsNotification": {
               /* SmsNotificationInfo */
               "MoneyInSms": (string),
               "MoneyOutSms": (string),
               "PausedByDayBudgetSms": (string),
               "SmsTimeFrom": (string),
               "SmsTimeTo": (string)
            },
            "EmailNotification": {
               /* EmailNotificationInfo */
               "Email": (string),
               "MoneyWarningValue": (int),
               "PausedByDayBudget": (string)
            }
         }
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >AccountManagementRequest object</sub>**
||
||
`Action`
|
Action: Update.
|
Yes
||
||
`Accounts`
|
Array of `Account` objects. Each object contains information about settings for a shared account.
|
No
||

||
**<sub >Account object</sub>**
||
||
`AccountID`
|
ID of the shared account to change settings for.
|
Yes
||
||
`AccountDayBudget`
|
The `AccountDayBudgetInfo` object with parameters for the daily limit on the shared account.
|
No
||
||
`SmsNotification`
|
The `SmsNotificationInfo` object with parameters for sending SMS notifications.

To get notifications, you must subscribe to them (see the Help section [Subscribe to SMS notifications](https://yandex.ru/support/direct/efficiency/sms-alerts.xml)[Subscribe to SMS notifications](https://yandex.com/support/direct/efficiency/sms-alerts.xml)). The phone number to send notifications to is taken from the user data (see the Help section [Mobile numbers](https://yandex.ru/support/passport/authorization/phone.xml)[Mobile numbers](https://yandex.com/support/passport/authorization/phone.xml)).
|
No
||
||
`EmailNotification`
|
The `EmailNotificationInfo` object with parameters for sending notifications by email.
|
No
||

||
**<sub >AccountDayBudgetInfo object</sub>**
||
||
`Amount`
|
The daily budget for the shared account (in the shared account currency).

To get the minimum acceptable value, use the [Dictionaries](https://yandex.com/dev/direct/doc/ref-v5dictionaries/dictionaries.md).[get](https://yandex.com/dev/direct/doc/ref-v5dictionaries/get.md) method for version 5 of the API and specify the dictionary name `Currencies` in the request.

A value of 0 nullifies the daily budget.
|
Yes
||
||
`SpendMode`
|
Mode for displaying ads:

- Default — Standard mode.
    
- Stretched — Distributed mode.
    

See [Daily budget](https://yandex.ru/support/direct/payments/shared-account.html#shared-account__day-budget)[Daily budget](https://yandex.com/support/direct/payments/shared-account.html#shared-account__day-budget) under “Shared account” in the Help for Yandex Direct.

The mode applies to all campaigns, and the corresponding setting on the campaign level is ignored.

{% note alert %}

This parameter is deprecated. 

{% endnote %}
|
Yes
||

||
**<sub >SmsNotificationInfo object</sub>**
||
||
`MoneyInSms`
|
Notify when funds are credited to the shared account — Yes/No. The predefined value is No.
|
No
||
||
`MoneyOutSms`
|
Notify when funds are debited from the shared account — Yes/No. The predefined value is No.
|
No
||
||
`PausedByDayBudgetSms`
|
Notify when campaigns are stopped because of reaching the daily limit on the shared account— Yes/No. The predefined value is Yes.
|
No
||
||
`SmsTimeFrom`
|
The allowed starting time for sending SMS notifications related to the shared account. Specified in the format HH:MM; minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”.
|
No
||
||
`SmsTimeTo`
|
The ending time for sending SMS notifications related to the shared account. Specified in the format HH:MM; minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”.
|
No
||

||
**<sub >EmailNotificationInfo object</sub>**
||
||
`Email`
|
The email address for sending notifications of events related to the shared account.
|
No
||
||
`MoneyWarningValue`
|
The minimal balance; notification is sent when the account balance is reduced to this amount. Set as a percentage of the amount of the last payment. The predefined value is 20.
|
No
||
||
`PausedByDayBudget`
|
Notify when campaigns are stopped because of reaching the daily limit on the shared account— Yes/No. The predefined value is Yes.
|
No
||
|#

## Output data


{% note alert %}

An error when changing settings for one of the shared accounts does not cause the entire operation to be canceled, and does not affect the success of changing settings for the other shared accounts.

{% endnote %}


The output data structure in JSON is shown below.

```javascript
{
   "data": {
      /* AccountManagementResponse */
      "ActionsResult": [
         {  /* AccountActionResult */
            "AccountID": (int),            
            "Errors": [
               {  /* Error */
                  "FaultCode": (int),
                  "FaultString": (string),
                  "FaultDetail": (string)
               }
               ...
            ]
         }
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
||

||
**<sub >AccountManagementResponse object</sub>**
||
||
`ActionsResult`
|
Array of `AccountActionResult` objects. Each object corresponds to an item in the `Accounts` input array and contains:

- The ID of the shared account, if the settings were changed successfully.
- The `Errors` array, if an error occurred.

The items in the array are in the same order as the objects in the `Accounts` input array.
||

||
**<sub >AccountActionResult object</sub>**
||
||
`AccountID`
|
ID of the shared account that settings were successfully changed for.
||
||
`Errors`
|
Array of `Error` objects with errors that occurred while transferring funds.
||

||
**<sub >Error object</sub>**
||
||
`FaultCode`
|
Error code.
||
||
`FaultString`
|
Textual message about the error.
||
||
`FaultDetail`
|
Detailed description of the reason for the error.
||
|#

## Examples of input data

# Python

```python
{
   'Action': 'Update',
   'Accounts': [
      {
         'AccountID': 1327944,
         'SmsNotification': {
            'MoneyInSms': 'Yes',
            'MoneyOutSms': 'Yes'
         },
         'EmailNotification': {
            'Email': 'agrom@yandex.ru',
            'MoneyWarningValue': 25
         }
      }
   ]
}
```

# PHP

```php
array(
   'Action' => 'Update',
   'Accounts' => array(
      array(
         'AccountID' => 1327944,
         'SmsNotification' => array(
            'MoneyInSms' => 'Yes',
            'MoneyOutSms' ='Yes'
         ),
         'EmailNotification' => array(
            'Email' => 'agrom@yandex.ru',
            'MoneyWarningValue' =25
         )
      )
   )
)
```

# Perl

```perl
{
   'Action' => 'Update',
   'Accounts' => [
      {
         'AccountID' => 1327944,
         'SmsNotification' ={
            'MoneyInSms' => 'Yes',
            'MoneyOutSms' ='Yes'
         },
         'EmailNotification' ={
            'Email' => 'agrom@yandex.ru',
            'MoneyWarningValue' =25
         }
      }
   ]
}
```

