Documentation
API version 4 and Live 4
Methods
Disabled methods

CreateOrUpdateCampaign (Live)

Creates a campaign with the specified parameters, or changes the parameters of an existing campaign.
Attention! 

Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions Live 4 and 5, see the Migration guide.

Restrictions

For editing campaigns, no more than 100 calls per day per campaign. For creating campaigns, no more than 100 calls per day.

The daily budget settings can be changed no more than three times a day.

Attention! This method only supports campaigns with the “Text & Image Ads” type. To work with all types of campaigns, use the Campaigns service in version 5 of the API. More about campaign types...

New in the Live 4 version

Added the AdditionalMetrikaCounters
[no-highlight[

Array containing IDs of Yandex.Metrica counters.

To delete counter IDs, pass an empty array. If the parameter is omitted, IDs are not changed.

Required

No

]no-highlight]
parameter.
Added the ContextStrategy
[no-highlight[

Determines the display strategy for the Yandex Advertising Network. Contains the CampaignContextStrategy object with the name and parameters of the strategy.

Required

No

]no-highlight]
parameter, which sets the display strategy in the Yandex Advertising Network. The ContextLimit
[no-highlight[

Budget limit for impressions in the Yandex Advertising Network:

  • Default means the budget is unlimited (this is the predefined value).
  • Limited means the budget is limited by the value of the ContextLimitSum parameter.

To avoid spending funds on impressions in the Yandex Advertising Network, disable impressions using the ShowsDisabled strategy (StrategyName parameter).

Required

No

]no-highlight]
, ContextLimitSum
[no-highlight[

Maximum percentage of the budget to be spent on ad impressions on content sites in the Yandex Advertising Network. The value is a multiple of ten: 10, 20, ..., 100. If the value is not set (null), the budget is unlimited (equal to Default in the ContextLimit parameter).

Required

No

]no-highlight]
and ContextPricePercent
[no-highlight[

Parameter for calculating CPC on content sites in the Yandex Advertising Network. Used for the Default strategy. Set as a percentage of the CPC on Yandex search. The value is a multiple of ten: 10, 20, ..., 100.

The value 100 makes the CPC in the Yandex Advertising Network equal to the CPC in the search.

Required

No

]no-highlight]
parameters moved under the ContextStrategy
[no-highlight[

Determines the display strategy for the Yandex Advertising Network. Contains the CampaignContextStrategy object with the name and parameters of the strategy.

Required

No

]no-highlight]
parameter.
Added the BidCoefs
[no-highlight[

An array of coefficients that raise or lower the CPC during certain time periods. Used for strategies with manual bid management. Coefficients are specified as percentages, and the value must be a multiple of ten: 0, 10, 20... 200.

You must set the same number of coefficients as there are hours set in the Hours array. Each coefficient correlates to a particular hour in the successive order in the array.

If the parameter is omitted, previously set coefficients are not changed.

Required

No

]no-highlight]
parameter to the time targeting settings. You can use this parameter to raise or lower the CPC during certain time periods. Also added the parameter WorkingHolidays
[no-highlight[

Change the display schedule when a work day is moved to Saturday or Sunday because of holidays — Yes/No.

For example, if a work day is moved from Monday to Saturday and the value is Yes, on the Saturday work day, impressions will be shown according to the Monday schedule, and on the Monday holiday, they will be shown according to the Saturday schedule.

Required

No

]no-highlight]
.
For the Yandex advertising network, automatic strategies for managing bids are available (StrategyName
[no-highlight[

Strategy in the Yandex Advertising Network. Acceptable values are listed below.

  • ShowsDisabled — Disable impressions in the Yandex Advertising Network. This is possible only if impressions are not disabled on search.

Strategies with manual bid management for the Yandex Advertising Network:

  • Default — The “Percentage of the price on Search” strategy. The percent is set in the ContextPricePercent parameter. There are additional optional parameters, ContextLimit and ContextLimitSum. This strategy is applied to campaigns that do not have a strategy explicitly set for them.

  • MaximumCoverage — “Maximum audience coverage” strategy. Bids are set using one of these methods: CreateOrUpdateBanners, SetAutoPrice (Live), or UpdatePrices.

    Attention! The MaximumCoverage strategy is not available if an automatic strategy is selected for search.

Automatic strategies in the Yandex Advertising Network:

Attention! 

Automatic strategies in the Yandex Advertising Network are available only if impressions are turned off for the search (ShowsDisabled strategy).

  • WeeklyBudget — The “Weekly budget: maximum clicks” strategy (mandatory parameter WeeklySumLimit; optional parameter MaxPrice).
  • CPAOptimizer — The “Weekly budget: maximum conversion rate” strategy (mandatory parameters WeeklySumLimit and GoalID; optional parameter MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • AverageClickPrice — The “Average CPC” strategy (mandatory parameter: AveragePrice; optional parameter: WeeklySumLimit).
  • WeeklyPacketOfClicks — The “Weekly click package” strategy (mandatory parameter: ClicksPerWeek; optional parameters: MaxPrice or AveragePrice).
  • AverageCPAOptimization — The “Average CPA” strategy (mandatory parameters AverageCPA and GoalID; optional parameters WeeklySumLimit and MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • ROIOptimization — The “Average ROI” strategy (mandatory parameters ReserveReturn, ROICoef, GoalID; optional parameters Profitability, WeeklySumLimit and MaxPrice). See conditions for using this strategy in the Help for Yandex.Direct.

Required

Yes

]no-highlight]
parameter in the CampaignContextStrategy object).
Added the Currency
[no-highlight[

The currency used in monetary parameters for strategies.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign‘s currency.

If this parameter is omitted or NULL, Yandex units are used. In this case, if the campaign is run using real currency, the values passed by the application are converted to the actual currency before saving (see the section Real currencies instead of Yandex units).

If the value is something other than NULL but it does not match the currency the client is operating in, an error is returned with code 245.

Required

No

]no-highlight]
input parameter (see the section Real currencies instead of Yandex units).
Added the ClickTrackingEnabled
[no-highlight[

Automatically add the yclid tag with a unique click ID to the ad link — Yes/No. The predefined value is No. Using this tag, you can more precisely track the results of ad campaigns in Metrica. For more information, see Tagging links for Metrica in the Help for Yandex.Direct.

Required

No

]no-highlight]
input parameter.
Added the DayBudget
[no-highlight[

The DayBudgetInfo object with parameters of the daily campaign budget.

Whether the daily budget can be managed depends on the value of the DayBudgetEnabled parameter that is returned by the GetCampaignsParams (Live), GetCampaignParams (Live), GetCampaignsList (Live), and GetCampaignsListFilter (Live) methods. If daily budget configuration is not available, an attempt to pass the DayBudget parameter causes an error with the code 71.

If an automatic display strategy is selected, the passed value is ignored and the daily budget is canceled.

Required

No

]no-highlight]
input parameter.
Added the AverageCPA
[no-highlight[

Average cost of reaching a goal (in the currency set in the Currency parameter) for the AverageCPAOptimization strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Required

For the AverageCPAOptimization strategy

]no-highlight]
input parameter for the AverageCPAOptimization strategy.
Added the MobileBidAdjustment
[no-highlight[

Coefficient for setting bids on mobile devices.

Used for campaigns and set as a percent of the desktop bid. A range of values from 50 to 1300. The default value is 100. With this value, the bid on mobile devices is the same as the bid on desktops. For more information about the coefficient, see Bid adjustment in the Help for Yandex.Direct.

Required

No

]no-highlight]
input parameter.
Added the EnableRelatedKeywords
[no-highlight[

Enable automatically adding related keywords — Yes/No. The predefined value is Yes.

Required

No

]no-highlight]
input parameter.
Added the ReserveReturn
[no-highlight[

The maximum percent of funds saved for the ROIOptimization strategy that can be returned to advertising (spent) if the forecasted return on investment exceeds the value of the ROICoef parameter.

A value from 0 to 100 as a multiple of ten: 0, 10, 20... 100.

Required

For the ROIOptimization strategy

]no-highlight]
, ROICoef
[no-highlight[

The desired average return on investment per week for the ROIOptimization strategy. The value is rounded to two decimal places.

Required

For the ROIOptimization strategy

]no-highlight]
, and Profitability
[no-highlight[

The percentage of revenue that is the cost value of products or services for the ROIOptimization strategy.

A value from 0 to 100, rounded to two decimal places.

Required

No

]no-highlight]
input parameters for the ROIOptimization strategy.
Added the ExtendedAdTitleEnabled
[no-highlight[

Enable substituting part of the ad text in the title — Yes/No. The predefined value is Yes.

Required

No

]no-highlight]
input parameter.
Added the MaintainNetworkCPC
[no-highlight[

Keep the average CPC on content sites lower than the average CPC on search — Yes/No. The predefined value is Yes.

Required

No

]no-highlight]
input parameter.

Input data

The input data structure in JSON is shown below.

{
   "method": "CreateOrUpdateCampaign",
   "param": {
      /* CampaignInfo */
      "Login
[no-highlight[

Login name of the campaign owner (username of the Yandex user that the ad campaign is run for).

When creating a campaign, direct advertisers set their own Yandex username, while advertising agencies set their client‘s username. When getting campaign parameters, the username of the advertiser‘s chief representative is returned.

Required

Yes

]no-highlight]
": (string), "CampaignID
[no-highlight[

The campaign ID.

To create a campaign, it is set to 0; to change the parameters of an existing campaign, the campaign ID is specified.

Required

Yes

]no-highlight]
": (int), "Name
[no-highlight[

The campaign name.

Required

Yes

]no-highlight]
": (string), "FIO
[no-highlight[

First name and last name of the campaign owner.

Required

Yes

]no-highlight]
": (string), "StartDate
[no-highlight[

Date to start impressions, YYYY-MM-DD. If omitted, the campaign creation date is used.

The date can be in the future. In this case, impressions begin on the specified date, if the moderator approved the ad and funds were transferred to the campaign balance.

Required

No

]no-highlight]
": (date), "Currency
[no-highlight[

The currency used in monetary parameters for strategies.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign‘s currency.

If this parameter is omitted or NULL, Yandex units are used. In this case, if the campaign is run using real currency, the values passed by the application are converted to the actual currency before saving (see the section Real currencies instead of Yandex units).

If the value is something other than NULL but it does not match the currency the client is operating in, an error is returned with code 245.

Required

No

]no-highlight]
": (string), "Strategy
[no-highlight[

Defines the display strategy on search. Contains the CampaignStrategy object with the strategy parameters.

Required

Yes

]no-highlight]
": { /* CampaignStrategy */ "StrategyName
[no-highlight[

Strategy on search. Acceptable values are listed below.

  • ShowsDisabled — Disable impressions on search. This is required when using an automatic strategy in the Yandex Advertising Network. Showing ads in the search cannot be disabled if the Default strategy is applied to the Yandex Advertising Network.

Strategies with manual bid management on search:

  • HighestPosition — “Highest available position” strategy.
  • LowestCost — “Cheapest position in ad block” strategy.
  • LowestCostPremium — “Cheapest position in ad block” strategy, but ads are displayed only in Premium Placement.
  • LowestCostGuarantee — “Impressions below search results” strategy (in the lower block at lowest cost).
  • RightBlockHighest — The “Impressions below search results” strategy (in the lower block at the highest position available for the specified bid).

Automatic strategies on search:

  • WeeklyBudget — The “Weekly budget: maximum clicks” strategy (mandatory parameter WeeklySumLimit; optional parameter MaxPrice).
  • CPAOptimizer — The “Weekly budget: maximum conversion rate” strategy (mandatory parameters WeeklySumLimit and GoalID; optional parameter MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • AverageClickPrice — The “Average CPC” strategy (mandatory parameter: AveragePrice; optional parameter: WeeklySumLimit).
  • WeeklyPacketOfClicks — The “Weekly click package” strategy (mandatory parameter: ClicksPerWeek; optional parameters: MaxPrice or AveragePrice).
  • AverageCPAOptimization — The “Average CPA” strategy (mandatory parameters AverageCPA and GoalID; optional parameters WeeklySumLimit and MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • ROIOptimization — The “Average ROI” strategy (mandatory parameters ReserveReturn, ROICoef, GoalID; optional parameters Profitability, WeeklySumLimit and MaxPrice). See conditions for using this strategy in the Help for Yandex.Direct.

Required

Yes

]no-highlight]
": (string), "MaxPrice
[no-highlight[

Maximum bid (in the currency specified in the Currency parameter). Can be set for the WeeklyBudget, WeeklyPacketOfClicks, and CPAOptimizer strategies, and for AverageCPAOptimization and ROIOptimization.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded down to the nearest bid increment in this currency (see the section Real currencies instead of Yandex units).

Required

No

]no-highlight]
": (float), "AveragePrice
[no-highlight[

Average bid (in the currency set in the Currency parameter) for the AverageClickPrice strategy. Can also be set for the WeeklyPacketOfClicks strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Required

For the AverageClickPrice strategy

]no-highlight]
": (float), "WeeklySumLimit
[no-highlight[

Maximum weekly budget (in the currency set in the Currency parameter) for the WeeklyBudget and CPAOptimizer strategies. Can also be set for the AverageClickPrice, AverageCPAOptimization, and ROIOptimization strategies.

The minimum value is shown in the Currency parameters and restrictions table. The restriction is checked in the currency specified in the Currency parameter (not in the campaign‘s currency).

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Required

For the WeeklyBudget and CPAOptimizer strategies

]no-highlight]
": (float), "AverageCPA
[no-highlight[

Average cost of reaching a goal (in the currency set in the Currency parameter) for the AverageCPAOptimization strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Required

For the AverageCPAOptimization strategy

]no-highlight]
": (float), "ClicksPerWeek
[no-highlight[

Number of clicks per week for the WeeklyPacketOfClicks strategy.

Required

For the WeeklyPacketOfClicks strategy

]no-highlight]
": (int), "GoalID
[no-highlight[

ID of the Yandex.Metrica goal for the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies (only non-composite goals are acceptable).

The value of 0 is all goals set on the site (except composite goals).

To get a list of goals, use the GetStatGoals (Live) method.

Required

For the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies

]no-highlight]
": (int), "ReserveReturn
[no-highlight[

The maximum percent of funds saved for the ROIOptimization strategy that can be returned to advertising (spent) if the forecasted return on investment exceeds the value of the ROICoef parameter.

A value from 0 to 100 as a multiple of ten: 0, 10, 20... 100.

Required

For the ROIOptimization strategy

]no-highlight]
": (int), "ROICoef
[no-highlight[

The desired average return on investment per week for the ROIOptimization strategy. The value is rounded to two decimal places.

Required

For the ROIOptimization strategy

]no-highlight]
": (float), "Profitability
[no-highlight[

The percentage of revenue that is the cost value of products or services for the ROIOptimization strategy.

A value from 0 to 100, rounded to two decimal places.

Required

No

]no-highlight]
": (float) }, "ContextStrategy
[no-highlight[

Determines the display strategy for the Yandex Advertising Network. Contains the CampaignContextStrategy object with the name and parameters of the strategy.

Required

No

]no-highlight]
": { /* CampaignContextStrategy */ "StrategyName
[no-highlight[

Strategy in the Yandex Advertising Network. Acceptable values are listed below.

  • ShowsDisabled — Disable impressions in the Yandex Advertising Network. This is possible only if impressions are not disabled on search.

Strategies with manual bid management for the Yandex Advertising Network:

  • Default — The “Percentage of the price on Search” strategy. The percent is set in the ContextPricePercent parameter. There are additional optional parameters, ContextLimit and ContextLimitSum. This strategy is applied to campaigns that do not have a strategy explicitly set for them.

  • MaximumCoverage — “Maximum audience coverage” strategy. Bids are set using one of these methods: CreateOrUpdateBanners, SetAutoPrice (Live), or UpdatePrices.

    Attention! The MaximumCoverage strategy is not available if an automatic strategy is selected for search.

Automatic strategies in the Yandex Advertising Network:

Attention! 

Automatic strategies in the Yandex Advertising Network are available only if impressions are turned off for the search (ShowsDisabled strategy).

  • WeeklyBudget — The “Weekly budget: maximum clicks” strategy (mandatory parameter WeeklySumLimit; optional parameter MaxPrice).
  • CPAOptimizer — The “Weekly budget: maximum conversion rate” strategy (mandatory parameters WeeklySumLimit and GoalID; optional parameter MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • AverageClickPrice — The “Average CPC” strategy (mandatory parameter: AveragePrice; optional parameter: WeeklySumLimit).
  • WeeklyPacketOfClicks — The “Weekly click package” strategy (mandatory parameter: ClicksPerWeek; optional parameters: MaxPrice or AveragePrice).
  • AverageCPAOptimization — The “Average CPA” strategy (mandatory parameters AverageCPA and GoalID; optional parameters WeeklySumLimit and MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • ROIOptimization — The “Average ROI” strategy (mandatory parameters ReserveReturn, ROICoef, GoalID; optional parameters Profitability, WeeklySumLimit and MaxPrice). See conditions for using this strategy in the Help for Yandex.Direct.

Required

Yes

]no-highlight]
": (string), "ContextLimit
[no-highlight[

Budget limit for impressions in the Yandex Advertising Network:

  • Default means the budget is unlimited (this is the predefined value).
  • Limited means the budget is limited by the value of the ContextLimitSum parameter.

To avoid spending funds on impressions in the Yandex Advertising Network, disable impressions using the ShowsDisabled strategy (StrategyName parameter).

Required

No

]no-highlight]
": (string), "ContextLimitSum
[no-highlight[

Maximum percentage of the budget to be spent on ad impressions on content sites in the Yandex Advertising Network. The value is a multiple of ten: 10, 20, ..., 100. If the value is not set (null), the budget is unlimited (equal to Default in the ContextLimit parameter).

Required

No

]no-highlight]
": (int), "ContextPricePercent
[no-highlight[

Parameter for calculating CPC on content sites in the Yandex Advertising Network. Used for the Default strategy. Set as a percentage of the CPC on Yandex search. The value is a multiple of ten: 10, 20, ..., 100.

The value 100 makes the CPC in the Yandex Advertising Network equal to the CPC in the search.

Required

No

]no-highlight]
": (int), "MaxPrice
[no-highlight[

Maximum bid (in the currency specified in the Currency parameter). Can be set for the WeeklyBudget, WeeklyPacketOfClicks, and CPAOptimizer strategies, and for AverageCPAOptimization and ROIOptimization.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded down to the nearest bid increment in this currency (see the section Real currencies instead of Yandex units).

Required

No

]no-highlight]
": (float), "AveragePrice
[no-highlight[

Average bid (in the currency set in the Currency parameter) for the AverageClickPrice strategy. Can also be set for the WeeklyPacketOfClicks strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Required

For the AverageClickPrice strategy

]no-highlight]
": (float), "AverageCPA
[no-highlight[

Average cost of reaching a goal (in the currency set in the Currency parameter) for the AverageCPAOptimization strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Required

For the AverageCPAOptimization strategy

]no-highlight]
": (float), "WeeklySumLimit
[no-highlight[

Maximum weekly budget (in the currency set in the Currency parameter) for the WeeklyBudget and CPAOptimizer strategies. Can also be set for the AverageClickPrice, AverageCPAOptimization, and ROIOptimization strategies.

The minimum value is shown in the Currency parameters and restrictions table. The restriction is checked in the currency specified in the Currency parameter (not in the campaign‘s currency).

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Required

For the WeeklyBudget and CPAOptimizer strategies

]no-highlight]
": (float), "ClicksPerWeek
[no-highlight[

Number of clicks per week for the WeeklyPacketOfClicks strategy.

Required

For the WeeklyPacketOfClicks strategy

]no-highlight]
": (int), "GoalID
[no-highlight[

ID of the Yandex.Metrica goal for the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies (only non-composite goals are acceptable).

The value of 0 is all goals set on the site (except composite goals).

To get a list of goals, use the GetStatGoals (Live) method.

Required

For the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies

]no-highlight]
": (int), "ReserveReturn
[no-highlight[

The maximum percent of funds saved for the ROIOptimization strategy that can be returned to advertising (spent) if the forecasted return on investment exceeds the value of the ROICoef parameter.

A value from 0 to 100 as a multiple of ten: 0, 10, 20... 100.

Required

For the ROIOptimization strategy

]no-highlight]
": (int), "ROICoef
[no-highlight[

The desired average return on investment per week for the ROIOptimization strategy. The value is rounded to two decimal places.

Required

For the ROIOptimization strategy

]no-highlight]
": (float), "Profitability
[no-highlight[

The percentage of revenue that is the cost value of products or services for the ROIOptimization strategy.

A value from 0 to 100, rounded to two decimal places.

Required

No

]no-highlight]
": (float) }, "AdditionalMetrikaCounters
[no-highlight[

Array containing IDs of Yandex.Metrica counters.

To delete counter IDs, pass an empty array. If the parameter is omitted, IDs are not changed.

Required

No

]no-highlight]
": [ (int) ... ], "ClickTrackingEnabled
[no-highlight[

Automatically add the yclid tag with a unique click ID to the ad link — Yes/No. The predefined value is No. Using this tag, you can more precisely track the results of ad campaigns in Metrica. For more information, see Tagging links for Metrica in the Help for Yandex.Direct.

Required

No

]no-highlight]
": (string), "SmsNotification
[no-highlight[

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). The phone number to send notifications to is taken from the user data (see the Help section Mobile numbers).

Required

No

]no-highlight]
": { /* SmsNotificationInfo */ "MetricaSms
[no-highlight[

Notify of Yandex.Metrica site monitoring results — Yes/No.

Required

No

]no-highlight]
": (string), "ModerateResultSms
[no-highlight[

Notify of ad moderation results — Yes/No.

Required

No

]no-highlight]
": (string), "MoneyInSms
[no-highlight[

Notify when funds are credited to the campaign balance — Yes/No. The predefined value is No.

If the client has the shared account enabled, this parameter is not used.

Required

No

]no-highlight]
": (string), "MoneyOutSms
[no-highlight[

Notify when the campaign balance is out of funds — Yes/No. The predefined value is No.

If the client has the shared account enabled, this parameter is not used.

Required

No

]no-highlight]
": (string), "SmsTimeFrom
[no-highlight[

The allowed starting time for sending SMS notifications of campaign events. Specified in the format HH:MM; minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”.

Required

No

]no-highlight]
": (string), "SmsTimeTo
[no-highlight[

The ending time for sending SMS notifications of campaign events. Specified in the format HH:MM; minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”.

Required

No

]no-highlight]
": (string) }, "EmailNotification
[no-highlight[

The EmailNotificationInfo object with parameters for sending notifications by email.

Required

Yes

]no-highlight]
": { /* EmailNotificationInfo */ "Email
[no-highlight[

The email address for sending notifications of campaign events.

Required

Yes

]no-highlight]
": (string), "WarnPlaceInterval
[no-highlight[

How often to check the position of ads: every 15, 30, or 60 minutes.

Notification is sent if the ad moved to a lower position than the one that the bid covered when it was set up.

Required

Yes

]no-highlight]
": (int), "MoneyWarningValue
[no-highlight[

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.

If the client has the shared account enabled, this parameter is not used.

Required

Yes

]no-highlight]
": (int), "SendAccNews
[no-highlight[

Notify of campaign events — Yes/No. It is set for campaigns that have a personal Yandex manager. The predefined value is No.

Required

No

]no-highlight]
": (string), "SendWarn
[no-highlight[

Whether to send email notifications — Yes/No. The predefined value is No.

Required

No

]no-highlight]
": (string) }, "StatusBehavior
[no-highlight[

Enable behavioral targeting — Yes/No. The predefined value is Yes.

Required

No

]no-highlight]
": (string), "TimeTarget
[no-highlight[

The TimeTargetInfo object with time targeting parameters.

Required

No

]no-highlight]
": { /* TimeTargetInfo */ "ShowOnHolidays
[no-highlight[

Show ads on holiday non-work days — Yes/No (does not include normal Saturdays and Sundays). The predefined value is Yes.

Required

No

]no-highlight]
": (string), "HolidayShowFrom
[no-highlight[

The time at which ads start being displayed on public holidays. If omitted, ads are displayed according to the schedule in the DaysHours parameter.

Required

No

]no-highlight]
": (int), "HolidayShowTo
[no-highlight[

The time at which ads stop being displayed on public holidays. If omitted, ads are displayed according to the schedule in the DaysHours parameter.

Required

No

]no-highlight]
": (int), "DaysHours
[no-highlight[

Array of TimeTargetItem objects that determines the schedule for ad displays (time targeting).

Required

Yes

]no-highlight]
": [ { /* TimeTargetItem */ "Hours
[no-highlight[

Array of integers from 0 to 23. The number 0 corresponds to the time interval from 00:00 to 00:59, the number 1 corresponds to the interval from 01:00 to 01:59, and so on.

The predefined value is an array of the numbers from 0 to 23, which equals all 24 hours of the day.

Required

Yes

]no-highlight]
": [ (int) ... ], "Days
[no-highlight[

Array of integers from 1 to 7. The number 1 corresponds to Monday, and 7 corresponds to Sunday. Ads are displayed on the specified days during the time set in the Hours parameter.

The predefined value is an array of the numbers from 1 to 7, which equals a complete week.

Required

Yes

]no-highlight]
": [ (int) ... ], "BidCoefs
[no-highlight[

An array of coefficients that raise or lower the CPC during certain time periods. Used for strategies with manual bid management. Coefficients are specified as percentages, and the value must be a multiple of ten: 0, 10, 20... 200.

You must set the same number of coefficients as there are hours set in the Hours array. Each coefficient correlates to a particular hour in the successive order in the array.

If the parameter is omitted, previously set coefficients are not changed.

Required

No

]no-highlight]
": [ (int) ... ] } ... ], "TimeZone
[no-highlight[

Time zone where the ad campaign owner is located. To get the list of time zones, use the GetTimeZones method.

Required

No

]no-highlight]
": (string), "WorkingHolidays
[no-highlight[

Change the display schedule when a work day is moved to Saturday or Sunday because of holidays — Yes/No.

For example, if a work day is moved from Monday to Saturday and the value is Yes, on the Saturday work day, impressions will be shown according to the Monday schedule, and on the Monday holiday, they will be shown according to the Saturday schedule.

Required

No

]no-highlight]
": (string) }, "StatusContextStop
[no-highlight[

Do not use keywords in the Yandex Advertising Network that were disabled on the search for a low CTR — Yes/No. The predefined value is No (when a keyword is disabled on the search, it continues being used in the Yandex Advertising Network).

Restriction. 

This parameter is no longer relevant for new keywords, since keywords are no longer excluded for a low CTR.

Required

No

]no-highlight]
": (string), "ContextLimit
[no-highlight[

The parameter is duplicated here for compatibility with the stable version 4 and will be removed in the future. The actual parameter has moved to the CampaignContextStrategy object.

Required

No

]no-highlight]
": (string), "ContextLimitSum
[no-highlight[

The parameter is duplicated here for compatibility with the stable version 4 and will be removed in the future. The actual parameter has moved to the CampaignContextStrategy object.

Required

No

]no-highlight]
": (int), "ContextPricePercent
[no-highlight[

The parameter is duplicated here for compatibility with the stable version 4 and will be removed in the future. The actual parameter has moved to the CampaignContextStrategy object.

Required

No

]no-highlight]
": (int), "AutoOptimization
[no-highlight[

Enable automatic keyword optimization — Yes/No. The predefined value is No.

Required

No

]no-highlight]
": (string), "StatusMetricaControl
[no-highlight[

Stop displays when the advertiser‘s web site is not available — Yes/No. Availability is detected by the results of monitoring performed by Yandex.Direct.

Required

No

]no-highlight]
": (string), "DisabledDomains
[no-highlight[

List of display places where the ad shouldn‘t be displayed:

  • Domain names of websites.
  • IDs of mobile apps (the bundle ID for iOS, or the package name for Android).
  • Names of ad exchanges (SSPs).

Maximum of 1000 display places. Values are comma-separated. For example, site.ru,ru.example.app.

Required

No

]no-highlight]
": (string), "DisabledIps
[no-highlight[

List of IP addresses that campaign ads should not be shown to. Addresses are separated by commas, such as 127.0.0.1,127.0.0.2.

Required

No

]no-highlight]
": (string), "StatusOpenStat
[no-highlight[

When redirecting to the advertiser‘s web site, append an OpenStat tag to the URL — Yes/No. The predefined value is No.

Required

No

]no-highlight]
": (string), "ConsiderTimeTarget
[no-highlight[

When calculating the price for the display position, ignore bids in competitors‘ ads that are currently stopped by their schedule — Yes/No. The predefined value is No (all ads are factored into the calculation).

Required

No

]no-highlight]
": (string), "MinusKeywords
[no-highlight[

Array of negative keywords that are shared by all the keywords of a campaign.

A keyword should be specified without the minus sign before the first word.

Maximum of 7 words per keyword. The maximum length of each word is 35 characters. The maximum combined length of negative keywords in the array is 20,000 characters. The “!” or “+” operator before a word is not included in the total length.

Required

No

]no-highlight]
": [ (string) ... ], "AddRelevantPhrases
[no-highlight[

Add additional relevant keywords to ads — Yes/No.

Required

No

]no-highlight]
": (string), "RelevantPhrasesBudgetLimit
[no-highlight[

Maximum percent of the budget to spend on clicks on additional relevant keywords. The value is a multiple of ten: 10, 20, ..., 100. The predefined value is 100.

Required

No

]no-highlight]
": (int), "DayBudget
[no-highlight[

The DayBudgetInfo object with parameters of the daily campaign budget.

Whether the daily budget can be managed depends on the value of the DayBudgetEnabled parameter that is returned by the GetCampaignsParams (Live), GetCampaignParams (Live), GetCampaignsList (Live), and GetCampaignsListFilter (Live) methods. If daily budget configuration is not available, an attempt to pass the DayBudget parameter causes an error with the code 71.

If an automatic display strategy is selected, the passed value is ignored and the daily budget is canceled.

Required

No

]no-highlight]
": { /* DayBudgetInfo */ "Amount
[no-highlight[

The daily campaign budget (in the currency specified in the Currency parameter).

The minimum acceptable value is shown in the Currency parameters and restrictions table. The restriction is checked in the currency specified in the Currency parameter (not in the campaign‘s currency).

A value of 0 nullifies the daily budget.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Required

Yes

]no-highlight]
": (float), "SpendMode
[no-highlight[

Evenly distribute the daily budget over the course of the day — Default/Stretched. When the value is Default, the daily budget may be used up and impressions may stop before the day is over.

Required

Yes

]no-highlight]
": (string) }, "MobileBidAdjustment
[no-highlight[

Coefficient for setting bids on mobile devices.

Used for campaigns and set as a percent of the desktop bid. A range of values from 50 to 1300. The default value is 100. With this value, the bid on mobile devices is the same as the bid on desktops. For more information about the coefficient, see Bid adjustment in the Help for Yandex.Direct.

Required

No

]no-highlight]
": (int), "EnableRelatedKeywords
[no-highlight[

Enable automatically adding related keywords — Yes/No. The predefined value is Yes.

Required

No

]no-highlight]
": (string), "ExtendedAdTitleEnabled
[no-highlight[

Enable substituting part of the ad text in the title — Yes/No. The predefined value is Yes.

Required

No

]no-highlight]
": (string), "MaintainNetworkCPC
[no-highlight[

Keep the average CPC on content sites lower than the average CPC on search — Yes/No. The predefined value is Yes.

Required

No

]no-highlight]
": (string) } }

Parameters are described below.

Parameter Description Required
CampaignInfo object
Login

Login name of the campaign owner (username of the Yandex user that the ad campaign is run for).

When creating a campaign, direct advertisers set their own Yandex username, while advertising agencies set their client's username. When getting campaign parameters, the username of the advertiser's chief representative is returned.

Yes
CampaignID

The campaign ID.

To create a campaign, it is set to 0; to change the parameters of an existing campaign, the campaign ID is specified.

Yes
Name

The campaign name.

Yes
FIO

First name and last name of the campaign owner.

Yes
Strategy

Defines the display strategy on search. Contains the CampaignStrategy object with the strategy parameters.

Yes
ContextStrategy

Determines the display strategy for the Yandex Advertising Network. Contains the CampaignContextStrategy object with the name and parameters of the strategy.

No
AdditionalMetrikaCounters

Array containing IDs of Yandex.Metrica counters.

To delete counter IDs, pass an empty array. If the parameter is omitted, IDs are not changed.

No
ClickTrackingEnabled Automatically add the yclid tag with a unique click ID to the ad link — Yes/No. The predefined value is No. Using this tag, you can more precisely track the results of ad campaigns in Metrica. For more information, see Tagging links for Metrica in the Help for Yandex.Direct.No
EmailNotification

The EmailNotificationInfo object with parameters for sending notifications by email.

Yes
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). The phone number to send notifications to is taken from the user data (see the Help section Mobile numbers).

No
StartDate

Date to start impressions, YYYY-MM-DD. If omitted, the campaign creation date is used.

The date can be in the future. In this case, impressions begin on the specified date, if the moderator approved the ad and funds were transferred to the campaign balance.

No
Currency

The currency used in monetary parameters for strategies.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign's currency.

If this parameter is omitted or NULL, Yandex units are used. In this case, if the campaign is run using real currency, the values passed by the application are converted to the actual currency before saving (see the section Real currencies instead of Yandex units).

If the value is something other than NULL but it does not match the currency the client is operating in, an error is returned with code 245.

No
StatusBehavior

Enable behavioral targeting — Yes/No. The predefined value is Yes.

No
TimeTarget

The TimeTargetInfo object with time targeting parameters.

No
StatusContextStop

Do not use keywords in the Yandex Advertising Network that were disabled on the search for a low CTR — Yes/No. The predefined value is No (when a keyword is disabled on the search, it continues being used in the Yandex Advertising Network).

Restriction. 

This parameter is no longer relevant for new keywords, since keywords are no longer excluded for a low CTR.

No
ContextLimit

The parameter is duplicated here for compatibility with the stable version 4 and will be removed in the future. The actual parameter has moved to the CampaignContextStrategy object.

No
ContextLimitSum

The parameter is duplicated here for compatibility with the stable version 4 and will be removed in the future. The actual parameter has moved to the CampaignContextStrategy object.

No
ContextPricePercent

The parameter is duplicated here for compatibility with the stable version 4 and will be removed in the future. The actual parameter has moved to the CampaignContextStrategy object.

No
AutoOptimization

Enable automatic keyword optimization — Yes/No. The predefined value is No.

No
StatusMetricaControl

Stop displays when the advertiser's web site is not available — Yes/No. Availability is detected by the results of monitoring performed by Yandex.Direct.

No
DisabledDomains

List of display places where the ad shouldn't be displayed:

  • Domain names of websites.
  • IDs of mobile apps (the bundle ID for iOS, or the package name for Android).
  • Names of ad exchanges (SSPs).

Maximum of 1000 display places. Values are comma-separated. For example, site.ru,ru.example.app.

No
DisabledIps

List of IP addresses that campaign ads should not be shown to. Addresses are separated by commas, such as 127.0.0.1,127.0.0.2.

No
StatusOpenStat

When redirecting to the advertiser's web site, append an OpenStat tag to the URL — Yes/No. The predefined value is No.

No
ConsiderTimeTarget

When calculating the price for the display position, ignore bids in competitors' ads that are currently stopped by their schedule — Yes/No. The predefined value is No (all ads are factored into the calculation).

No
MinusKeywords

Array of negative keywords that are shared by all the keywords of a campaign.

A keyword should be specified without the minus sign before the first word.

Maximum of 7 words per keyword. The maximum length of each word is 35 characters. The maximum combined length of negative keywords in the array is 20,000 characters. The “!” or “+” operator before a word is not included in the total length.

No
AddRelevantPhrases

Add additional relevant keywords to ads — Yes/No.

No
RelevantPhrasesBudgetLimit

Maximum percent of the budget to spend on clicks on additional relevant keywords. The value is a multiple of ten: 10, 20, ..., 100. The predefined value is 100.

No
DayBudget

The DayBudgetInfo object with parameters of the daily campaign budget.

Whether the daily budget can be managed depends on the value of the DayBudgetEnabled
[no-highlight[

Daily campaign budget management is available — Yes/No.

]no-highlight]
parameter that is returned by the GetCampaignsParams (Live)
[no-highlight[

Returns the campaign parameters.

More GetCampaignsParams (Live)

]no-highlight]
, GetCampaignParams (Live)
[no-highlight[

Returns the campaign parameters.

More GetCampaignParams (Live)

]no-highlight]
, GetCampaignsList (Live)
[no-highlight[

Returns a list of campaigns with brief information about them.

More GetCampaignsList (Live)

]no-highlight]
, and GetCampaignsListFilter (Live)
[no-highlight[

Returns a list of campaigns that meet the filter conditions with brief information about these campaigns.

More GetCampaignsListFilter (Live)

]no-highlight]
methods. If daily budget configuration is not available, an attempt to pass the DayBudget parameter causes an error with the code 71.

If an automatic display strategy is selected, the passed value is ignored and the daily budget is canceled.

No
MobileBidAdjustment

Coefficient for setting bids on mobile devices.

Used for campaigns and set as a percent of the desktop bid. A range of values from 50 to 1300. The default value is 100. With this value, the bid on mobile devices is the same as the bid on desktops. For more information about the coefficient, see Bid adjustment in the Help for Yandex.Direct.

No
EnableRelatedKeywords Enable automatically adding related keywords — Yes/No. The predefined value is Yes.No
ExtendedAdTitleEnabled Enable substituting part of the ad text in the title — Yes/No. The predefined value is Yes.No
MaintainNetworkCPC Keep the average CPC on content sites lower than the average CPC on search — Yes/No. The predefined value is Yes.No
CampaignStrategy object
StrategyName

Strategy on search. Acceptable values are listed below.

  • ShowsDisabled — Disable impressions on search. This is required when using an automatic strategy in the Yandex Advertising Network. Showing ads in the search cannot be disabled if the Default strategy is applied to the Yandex Advertising Network.

Strategies with manual bid management on search:

  • HighestPosition — “Highest available position” strategy.
  • LowestCost — “Cheapest position in ad block” strategy.
  • LowestCostPremium — “Cheapest position in ad block” strategy, but ads are displayed only in Premium Placement.
  • LowestCostGuarantee — “Impressions below search results” strategy (in the lower block at lowest cost).
  • RightBlockHighest — The “Impressions below search results” strategy (in the lower block at the highest position available for the specified bid).

Automatic strategies on search:

  • WeeklyBudget — The “Weekly budget: maximum clicks” strategy (mandatory parameter WeeklySumLimit; optional parameter MaxPrice).
  • CPAOptimizer — The “Weekly budget: maximum conversion rate” strategy (mandatory parameters WeeklySumLimit and GoalID; optional parameter MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • AverageClickPrice — The “Average CPC” strategy (mandatory parameter: AveragePrice; optional parameter: WeeklySumLimit).
  • WeeklyPacketOfClicks — The “Weekly click package” strategy (mandatory parameter: ClicksPerWeek; optional parameters: MaxPrice or AveragePrice).
  • AverageCPAOptimization — The “Average CPA” strategy (mandatory parameters AverageCPA and GoalID; optional parameters WeeklySumLimit and MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • ROIOptimization — The “Average ROI” strategy (mandatory parameters ReserveReturn, ROICoef, GoalID; optional parameters Profitability, WeeklySumLimit and MaxPrice). See conditions for using this strategy in the Help for Yandex.Direct.
Yes
MaxPrice

Maximum bid (in the currency specified in the Currency parameter). Can be set for the WeeklyBudget, WeeklyPacketOfClicks, and CPAOptimizer strategies, and for AverageCPAOptimization and ROIOptimization.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded down to the nearest bid increment in this currency (see the section Real currencies instead of Yandex units).

No
AveragePrice

Average bid (in the currency set in the Currency parameter) for the AverageClickPrice strategy. Can also be set for the WeeklyPacketOfClicks strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

For the AverageClickPrice strategy
AverageCPA

Average cost of reaching a goal (in the currency set in the Currency parameter) for the AverageCPAOptimization strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

For the AverageCPAOptimization strategy
WeeklySumLimit

Maximum weekly budget (in the currency set in the Currency parameter) for the WeeklyBudget and CPAOptimizer strategies. Can also be set for the AverageClickPrice, AverageCPAOptimization, and ROIOptimization strategies.

The minimum value is shown in the Currency parameters and restrictions table. The restriction is checked in the currency specified in the Currency parameter (not in the campaign's currency).

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

For the WeeklyBudget and CPAOptimizer strategies
ClicksPerWeek Number of clicks per week for the WeeklyPacketOfClicks strategy.For the WeeklyPacketOfClicks strategy
GoalID

ID of the Yandex.Metrica goal for the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies (only non-composite goals are acceptable).

The value of 0 is all goals set on the site (except composite goals).

To get a list of goals, use the GetStatGoals (Live)
[no-highlight[

Returns information about the Yandex.Metrica goals that are available for the campaign.

More GetStatGoals (Live)

]no-highlight]
method.
For the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies
ReserveReturn

The maximum percent of funds saved for the ROIOptimization strategy that can be returned to advertising (spent) if the forecasted return on investment exceeds the value of the ROICoef parameter.

A value from 0 to 100 as a multiple of ten: 0, 10, 20... 100.

For the ROIOptimization strategy
ROICoef The desired average return on investment per week for the ROIOptimization strategy. The value is rounded to two decimal places.For the ROIOptimization strategy
Profitability

The percentage of revenue that is the cost value of products or services for the ROIOptimization strategy.

A value from 0 to 100, rounded to two decimal places.

No
CampaignContextStrategy object
StrategyName

Strategy in the Yandex Advertising Network. Acceptable values are listed below.

  • ShowsDisabled — Disable impressions in the Yandex Advertising Network. This is possible only if impressions are not disabled on search.

Strategies with manual bid management for the Yandex Advertising Network:

  • Default — The “Percentage of the price on Search” strategy. The percent is set in the ContextPricePercent parameter. There are additional optional parameters, ContextLimit and ContextLimitSum. This strategy is applied to campaigns that do not have a strategy explicitly set for them.

  • MaximumCoverage — “Maximum audience coverage” strategy. Bids are set using one of these methods: CreateOrUpdateBanners, SetAutoPrice (Live), or UpdatePrices.

    Attention! The MaximumCoverage strategy is not available if an automatic strategy is selected for search.

Automatic strategies in the Yandex Advertising Network:

Attention! 

Automatic strategies in the Yandex Advertising Network are available only if impressions are turned off for the search (ShowsDisabled strategy).

  • WeeklyBudget — The “Weekly budget: maximum clicks” strategy (mandatory parameter WeeklySumLimit; optional parameter MaxPrice).
  • CPAOptimizer — The “Weekly budget: maximum conversion rate” strategy (mandatory parameters WeeklySumLimit and GoalID; optional parameter MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • AverageClickPrice — The “Average CPC” strategy (mandatory parameter: AveragePrice; optional parameter: WeeklySumLimit).
  • WeeklyPacketOfClicks — The “Weekly click package” strategy (mandatory parameter: ClicksPerWeek; optional parameters: MaxPrice or AveragePrice).
  • AverageCPAOptimization — The “Average CPA” strategy (mandatory parameters AverageCPA and GoalID; optional parameters WeeklySumLimit and MaxPrice). See the conditions for using this strategy in the Help for Yandex.Direct.
  • ROIOptimization — The “Average ROI” strategy (mandatory parameters ReserveReturn, ROICoef, GoalID; optional parameters Profitability, WeeklySumLimit and MaxPrice). See conditions for using this strategy in the Help for Yandex.Direct.
Yes
ContextLimit

Budget limit for impressions in the Yandex Advertising Network:

  • Default means the budget is unlimited (this is the predefined value).
  • Limited means the budget is limited by the value of the ContextLimitSum parameter.

To avoid spending funds on impressions in the Yandex Advertising Network, disable impressions using the ShowsDisabled strategy (StrategyName parameter).

No
ContextLimitSum

Maximum percentage of the budget to be spent on ad impressions on content sites in the Yandex Advertising Network. The value is a multiple of ten: 10, 20, ..., 100. If the value is not set (null), the budget is unlimited (equal to Default in the ContextLimit parameter).

No
ContextPricePercent

Parameter for calculating CPC on content sites in the Yandex Advertising Network. Used for the Default strategy. Set as a percentage of the CPC on Yandex search. The value is a multiple of ten: 10, 20, ..., 100.

The value 100 makes the CPC in the Yandex Advertising Network equal to the CPC in the search.

No
MaxPrice

Maximum bid (in the currency specified in the Currency parameter). Can be set for the WeeklyBudget, WeeklyPacketOfClicks, and CPAOptimizer strategies, and for AverageCPAOptimization and ROIOptimization.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded down to the nearest bid increment in this currency (see the section Real currencies instead of Yandex units).

No
AveragePrice

Average bid (in the currency set in the Currency parameter) for the AverageClickPrice strategy. Can also be set for the WeeklyPacketOfClicks strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

For the AverageClickPrice strategy
AverageCPA

Average cost of reaching a goal (in the currency set in the Currency parameter) for the AverageCPAOptimization strategy.

The maximum and minimum values are provided in the Currency parameters and restrictions table.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

For the AverageCPAOptimization strategy
WeeklySumLimit

Maximum weekly budget (in the currency set in the Currency parameter) for the WeeklyBudget and CPAOptimizer strategies. Can also be set for the AverageClickPrice, AverageCPAOptimization, and ROIOptimization strategies.

The minimum value is shown in the Currency parameters and restrictions table. The restriction is checked in the currency specified in the Currency parameter (not in the campaign's currency).

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

For the WeeklyBudget and CPAOptimizer strategies
ClicksPerWeek Number of clicks per week for the WeeklyPacketOfClicks strategy.For the WeeklyPacketOfClicks strategy
GoalID

ID of the Yandex.Metrica goal for the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies (only non-composite goals are acceptable).

The value of 0 is all goals set on the site (except composite goals).

To get a list of goals, use the GetStatGoals (Live)
[no-highlight[

Returns information about the Yandex.Metrica goals that are available for the campaign.

More GetStatGoals (Live)

]no-highlight]
method.
For the CPAOptimizer, AverageCPAOptimization, and ROIOptimization strategies
ReserveReturn

The maximum percent of funds saved for the ROIOptimization strategy that can be returned to advertising (spent) if the forecasted return on investment exceeds the value of the ROICoef parameter.

A value from 0 to 100 as a multiple of ten: 0, 10, 20... 100.

For the ROIOptimization strategy
ROICoef The desired average return on investment per week for the ROIOptimization strategy. The value is rounded to two decimal places.For the ROIOptimization strategy
Profitability

The percentage of revenue that is the cost value of products or services for the ROIOptimization strategy.

A value from 0 to 100, rounded to two decimal places.

No
SmsNotificationInfo object
MetricaSms Notify of Yandex.Metrica site monitoring results — Yes/No.No
ModerateResultSms Notify of ad moderation results — Yes/No.No
MoneyInSms

Notify when funds are credited to the campaign balance — Yes/No. The predefined value is No.

If the client has the shared account enabled, this parameter is not used.

No
MoneyOutSms

Notify when the campaign balance is out of funds — Yes/No. The predefined value is No.

If the client has the shared account enabled, this parameter is not used.

No
SmsTimeFrom The allowed starting time for sending SMS notifications of campaign events. 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 of campaign events. Specified in the format HH:MM; minutes are set in multiples of 15 (0, 15, 30, 45). For example, “19:45”.No
EmailNotificationInfo object
Email The email address for sending notifications of campaign events.Yes
WarnPlaceInterval

How often to check the position of ads: every 15, 30, or 60 minutes.

Notification is sent if the ad moved to a lower position than the one that the bid covered when it was set up.

Yes
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.

If the client has the shared account enabled, this parameter is not used.

Yes
SendAccNews

Notify of campaign events — Yes/No. It is set for campaigns that have a personal Yandex manager. The predefined value is No.

No
SendWarn

Whether to send email notifications — Yes/No. The predefined value is No.

No
TimeTargetInfo object
ShowOnHolidays

Show ads on holiday non-work days — Yes/No (does not include normal Saturdays and Sundays). The predefined value is Yes.

No
HolidayShowFrom

The time at which ads start being displayed on public holidays. If omitted, ads are displayed according to the schedule in the DaysHours parameter.

No
HolidayShowTo

The time at which ads stop being displayed on public holidays. If omitted, ads are displayed according to the schedule in the DaysHours parameter.

No
DaysHours

Array of TimeTargetItem objects that determines the schedule for ad displays (time targeting).

Yes
TimeZone
Time zone where the ad campaign owner is located. To get the list of time zones, use the GetTimeZones
[no-highlight[

Returns a list of time zones.

More GetTimeZones

]no-highlight]
method.
No
WorkingHolidays

Change the display schedule when a work day is moved to Saturday or Sunday because of holidays — Yes/No.

For example, if a work day is moved from Monday to Saturday and the value is Yes, on the Saturday work day, impressions will be shown according to the Monday schedule, and on the Monday holiday, they will be shown according to the Saturday schedule.

No
TimeTargetItem object
Hours

Array of integers from 0 to 23. The number 0 corresponds to the time interval from 00:00 to 00:59, the number 1 corresponds to the interval from 01:00 to 01:59, and so on.

The predefined value is an array of the numbers from 0 to 23, which equals all 24 hours of the day.

Yes
Days

Array of integers from 1 to 7. The number 1 corresponds to Monday, and 7 corresponds to Sunday. Ads are displayed on the specified days during the time set in the Hours parameter.

The predefined value is an array of the numbers from 1 to 7, which equals a complete week.

Yes
BidCoefs

An array of coefficients that raise or lower the CPC during certain time periods. Used for strategies with manual bid management. Coefficients are specified as percentages, and the value must be a multiple of ten: 0, 10, 20... 200.

You must set the same number of coefficients as there are hours set in the Hours array. Each coefficient correlates to a particular hour in the successive order in the array.

If the parameter is omitted, previously set coefficients are not changed.

No
DayBudgetInfo object
Amount

The daily campaign budget (in the currency specified in the Currency parameter).

The minimum acceptable value is shown in the Currency parameters and restrictions table. The restriction is checked in the currency specified in the Currency parameter (not in the campaign's currency).

A value of 0 nullifies the daily budget.

If the value is converted from Yandex units to the campaign currency before saving, it is rounded to the second digit after the decimal, following mathematical rules (for all currencies, including the tenge).

Yes
SpendMode Evenly distribute the daily budget over the course of the day — Default/Stretched. When the value is Default, the daily budget may be used up and impressions may stop before the day is over.Yes

Output data

The method returns the ID of the created or edited campaign, as shown in the following example.

{
   "data": 3193279
}

Examples of input data

{
   "Login":"agrom",
   "CampaignID":3193279,
   "Name":"Promotion of home appliances",
   "FIO":"Alex Gromov",
   "Strategy":{
      "StrategyName":"RightBlockHighest"
   },
   "ContextStrategy": {
      "StrategyName":"Default",
      "ContextLimit":"Limited",
      "ContextLimitSum":30,
      "ContextPricePercent":90
   },
   "TimeTarget":{
      "TimeZone":"Europe/Moscow",
      "DaysHours":[
         {
            "Hours":[1,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],
            "Days":[1,2,3,4,5]
         },
         {
            "Hours":[10,11,12,13,14,15,16,17,18,19,20],
            "Days":[6,7],
            "BidCoefs":[40,40,40,50,150,160,200,60,60,20,10]
         }
      ],
      "ShowOnHolidays":"Yes",
      "WorkingHolidays": "No"
   },
   "StatusBehavior":"Yes",
   "StatusContextStop":"No",

   "AutoOptimization":"Yes",
   "StatusMetricaControl":"Yes",
   "DisabledDomains": "domain1.ru,domain2.ru",
   "DisabledIps": "64.234.23.21",
   "StatusOpenStat":"No",
   "ConsiderTimeTarget":"Yes",
   "AddRelevantPhrases":"No",
   "RelevantPhrasesBudgetLimit":100,
   "MinusKeywords":[],
   "SmsNotification":{
      "SmsTimeFrom":"09:00",
      "MoneyInSms":"Yes",
      "SmsTimeTo":"21:00",
      "MoneyOutSms":"Yes",
      "ModerateResultSms":"Yes",
      "MetricaSms":"Yes"
   },
   "EmailNotification":{
      "MoneyWarningValue":20,
      "SendAccNews":"Yes",
      "WarnPlaceInterval":60,
      "SendWarn":"Yes",
      "Email":"agrom@yandex.ru"
   }
}
array(
   "Login" => "agrom",
   "CampaignID" => 3193279,
   "Name" => "Promotion of home appliances",
   "FIO" => "Alex Gromov",
   "Strategy" => array(
      "StrategyName" => "RightBlockHighest"
   ),
   "ContextStrategy" => array(
      "StrategyName" => "Default",
      "ContextLimit" => "Limited",
      "ContextLimitSum" => 30,
      "ContextPricePercent" => 90
   ),
   "TimeTarget" => array(
      "TimeZone" => "Europe/Moscow",
      "DaysHours" => array(
         array(
            "Hours" => array(1,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23),
            "Days" => array(1,2,3,4,5)
         ),
         array(
            "Hours" => array(10,11,12,13,14,15,16,17,18,19,20),
            "Days" => array(6,7),
            "BidCoefs" => array(40,40,40,50,150,160,200,60,60,20,10)
         )
      ),
      "ShowOnHolidays" => "Yes",
      "WorkingHolidays" => "No"
   ),
   "StatusBehavior" => "Yes",
   "StatusContextStop" => "No",
   "AutoOptimization" => "Yes",
   "StatusMetricaControl" => "Yes",
   "DisabledDomains" => "domain1.ru,domain2.ru",
   "DisabledIps" => "64.234.23.21",
   "StatusOpenStat" => "No",
   "ConsiderTimeTarget" => "Yes",
   "AddRelevantPhrases" => "No",
   "RelevantPhrasesBudgetLimit" => 100,
   "MinusKeywords" => array(),
   "SmsNotification" => array(
      "SmsTimeFrom" => "09:00",
      "MoneyInSms" => "Yes",
      "SmsTimeTo" => "21:00",
      "MoneyOutSms" => "Yes",
      "ModerateResultSms" => "Yes",
      "MetricaSms" => "Yes"
   ),
   "EmailNotification" => array(
      "MoneyWarningValue" => 20,
      "SendAccNews" => "Yes",
      "WarnPlaceInterval" => 60,
      "SendWarn" => "Yes",
      "Email" => "agrom@yandex.ru"
   )
)
{
   'Login' => 'agrom',
   'CampaignID' => 3193279,
   'Name' => 'Promotion of home appliances',
   'FIO' => 'Alex Gromov',
   'Strategy' => {
      'StrategyName' => 'RightBlockHighest'
   },
   'ContextStrategy' => {
      'StrategyName' => 'Default',
      'ContextLimit' => 'Limited',
      'ContextLimitSum' => 30,
      'ContextPricePercent' => 90
   },
   'TimeTarget' => {
      'TimeZone' => 'Europe/Moscow',
      'DaysHours' => [
         {
            'Hours' => [1,2,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],
            'Days' => [1,2,3,4,5]
         },
         {
            'Hours' => [10,11,12,13,14,15,16,17,18,19,20],
            'Days' => [6,7],
            'BidCoefs' => [40,40,40,50,150,160,200,60,60,20,10]
         }
      ],
      'ShowOnHolidays' => 'Yes',
      'WorkingHolidays' => 'No'
   },
   'StatusBehavior' => 'Yes',
   'StatusContextStop' => 'No',
   'AutoOptimization' => 'Yes',
   'StatusMetricaControl' => 'Yes',
   'DisabledDomains' => 'domain1.ru,domain2.ru',
   'DisabledIps' => '64.234.23.21',
   'StatusOpenStat' => 'No',
   'ConsiderTimeTarget' => 'Yes',
   'AddRelevantPhrases' => 'No',
   'RelevantPhrasesBudgetLimit' => 100,
   'MinusKeywords' => [],
   'SmsNotification' => {
      'SmsTimeFrom' => '09:00',
      'MoneyInSms' => 'Yes',
      'SmsTimeTo' => '21:00',
      'MoneyOutSms' => 'Yes',
      'ModerateResultSms' => 'Yes',
      'MetricaSms' => 'Yes'
   },
   'EmailNotification' => {
      'MoneyWarningValue' => 20,
      'SendAccNews' => 'Yes',
      'WarnPlaceInterval' => 60,
      'SendWarn' => 'Yes',
      'Email' => 'agrom@yandex.ru'
   }
}