update
Changes campaign parameters.
Learn more
Restrictions
Maximum of 10 campaigns per method call.
Request
Warning
Manual bidding campaigns switched from daily budgets to a weekly budget format. The current value of the DailyBudget parameter is automatically recalculated as a weekly amount, taking your ad schedule into account.
To set up a weekly budget for a manual bidding campaign, we recommend using the WeeklySpendLimit parameter in the ManualCpm and HighestPosition strategies.
As of August 22, the DailyBudget parameter is deprecated.
Request structure in JSON format:
{
"method": "update",
"params": { /* params */
"Campaigns": [{ /* CampaignUpdateItem */
"Id": (long), /* required */
"Name": (string),
"StartDate": (string),
"EndDate": (string), /* nillable */
"NegativeKeywords": { /* ArrayOfString */
"Items": [(string), ... ] /* required */
}, /* nillable */
"BlockedIps": { /* ArrayOfString */
"Items": [(string), ... ] /* required */
}, /* nillable */
"ExcludedSites": { /* ArrayOfString */
"Items": [(string), ... ] /* required */
}, /* nillable */
"TextCampaign": { /* TextCampaignUpdateItem */
... text campaign params ...
},
"MobileAppCampaign": { /* MobileAppCampaignUpdateItem */
... mobile app campaign params ...
},
"CpmBannerCampaign": { /* CpmBannerCampaignUpdateItem */
... cpm banner campaign params ...
},
"UnifiedCampaign": { /* SmartCampaignUpdateItem */
... unified campaign params ...
},
"ClientInfo": (string),
"Notification": { /* Notification */
"SmsSettings": { /* SmsSettings */
"Events": [( "MONITORING" | ... | "FINISHED" ), ... ],
"TimeFrom": (string),
"TimeTo": (string)
},
"EmailSettings": { /* EmailSettings */
"Email": (string),
"CheckPositionInterval": (int),
"WarningBalance": (int),
"SendAccountNews": ( "YES" | "NO" ),
"SendWarnings": ( "YES" | "NO" )
}
},
"TimeTargeting": { /* TimeTargeting */
"Schedule": { /* ArrayOfString */
"Items": [(string), ... ] /* required */
},
"ConsiderWorkingWeekends": ( "YES" | "NO" ), /* required */
"HolidaysSchedule": { /* TimeTargetingOnPublicHolidays */
"SuspendOnHolidays": ( "YES" | "NO" ), /* required */
"BidPercent": (int),
"StartHour": (int),
"EndHour": (int)
} /* nillable */
},
"TimeZone": (string)
}, ... ] /* required */
}
}
|
Parameter |
Type |
Description |
Required |
|
params structure (for JSON) / AddRequest structure (for SOAP) |
|||
|
|
array of CampaignUpdateItem |
Campaigns whose parameters need to be changed. |
Yes |
|
CampaignUpdateItem structure |
|||
|
|
long |
The ID of the campaign to change parameters for. |
Yes |
|
|
string |
Campaign name (maximum of 255 characters). |
No |
|
|
string |
Client name (maximum of 255 characters). The default value is the name from the user's settings. Can't be set for UnifiedCampaign. |
No |
|
|
string |
Start date for displaying ads, in the format YYYY-MM-DD. Can't be earlier than the current date. Ad impressions begin at 00:00 (UTC+3) regardless of the Ad displays are possible only if at least one ad has passed review and funds have been credited to the campaign or shared account. If you set a budget for a custom period for the campaign, the value in this field is ignored, and the strategy period is prioritized instead. |
No |
|
|
string, nillable |
End date for displaying ads, in the format YYYY-MM-DD. Ad impressions end at 00:00 (UTC+3) regardless of the |
No |
|
|
TimeTargeting |
Settings for time targeting and hourly bid adjustments. Specified for the time zone set in the |
No |
|
|
string |
User's local time zone. Use the Dictionaries.get method to get a reference list of time zones. The default value is Europe/Moscow. |
No |
|
|
ArrayOfString, nillable |
Array of negative keywords that are shared by all the keywords of a campaign. Alert This parameter can't be used with display campaigns. 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. Spaces, dashes, and operators are not counted as part of the total length. |
No |
|
|
ArrayOfString, nillable |
Array of IP addresses that campaign ads should not be shown to. Maximum of 25 items in the array. |
No |
|
|
ArrayOfString, nillable |
Array of display places where the ad shouldn't be displayed:
Maximum of 1000 items in the array. Maximum of 255 characters per array item. |
No |
|
|
DailyBudget, nillable |
Daily budget settings for manual bidding campaigns. Note Manual bidding campaigns switched from daily budgets to a weekly budget format. Existing budget values will be automatically recalculated as weekly amounts, taking your ad schedule into account. For example, if your campaign runs all week and you set a daily budget of ₽1000, the weekly budget will be ₽7000. To reset the daily budget, pass null (nil). |
No |
|
|
Notification |
Settings for SMS and email notifications. |
No |
|
|
TextCampaignUpdateItem |
Settings for campaigns of the "Text & Image ads" type. For a description of the data structure, see the section update: TextCampaign parameters. |
No |
|
|
MobileAppCampaignUpdateItem |
Settings for "Ads for mobile apps" campaigns. For a description of the data structure, see the section update: MobileAppCampaign parameters. |
No |
|
|
CpmBannerCampaignUpdateItem |
Settings for display campaigns. For a description of the data structure, see the section update: CpmBannerCampaign parameters. |
No |
|
|
UnifiedCampaignUpdateItem |
Settings for unified performance campaigns. For a description of the data structure, see update: UnifiedCampaign parameters. |
No |
|
TimeTargeting structure |
|||
|
|
ArrayOfString |
Settings for time targeting and hourly bid adjustments. Maximum of 7 items in the array. Each array item contains 25 comma-separated numbers. The first number is the number of the day of the week: from 1 (Monday) to 7 (Sunday). The next 24 numbers are a sequence of bid coefficients for displaying ads in the corresponding hours. Coefficients are specified as percentages from 0 to 200. The value must be a multiple of 10: If the coefficient is 0, no ads are served during this hour. Example of an array element: 1, 0, 0, 50, 50, 100, 100, 150, 200, 200, 150, 100, 100, 80, 70, 100, 100, 100, 50, 50, 40, 30, 0, 0, 0 Note
|
No |
|
|
YesNoEnum |
Whether to change the display schedule when a work day is moved to Saturday or Sunday because of a public holiday. For example, if a work day is moved from Monday to Saturday and the value is YES, on the Saturday work day, ads are displayed according to the Monday schedule, and on the Monday holiday, they are displayed according to the Saturday schedule. |
Yes |
|
|
TimeTargetingOnPublicHolidays, nillable |
Display settings on public holidays. If the time zone specified in the |
No |
|
TimeTargetingOnPublicHolidays structure |
|||
|
|
YesNoEnum |
Whether to suspend ads on public holidays: YES — suspend; NO — don't suspend. Note You can specify the |
Yes |
|
|
int |
The bid coefficient for displays on public holidays. Specified as a percentage from 0 to 200. The value must be a multiple of 10. |
No |
|
|
int |
The time (in hours) to start displays on public holidays. From 0 to 23. |
When the |
|
|
int |
The time (in hours) to end displays on public holidays. From 0 to 24. |
When the |
|
DailyBudget structure |
|||
|
|
long |
The daily campaign budget in the user's currency, multiplied by 1,000,000. Note Manual bidding campaigns switched from daily budgets to a weekly budget format. Existing budget values will be automatically recalculated as weekly amounts, taking your ad schedule into account. The minimum daily budget for each currency is listed in the currency reference. To get the list of currencies, use the Dictionaries.get method. |
Yes |
|
|
DailyBudgetModeEnum |
Mode for displaying ads:
For details, see Maximize clicks with manual bids under "Display strategies" in Yandex Direct Help. Alert The parameter is deprecated and no longer used. |
Yes |
|
Notification structure |
|||
|
|
SmsSettings |
Settings for sending SMS notifications. The phone number for SMS notifications is pulled from the user's Yandex ID (see in Yandex ID Help). Can't be set for UnifiedCampaign. |
No |
|
|
EmailSettings |
Settings for sending email notifications. |
No |
|
SmsSettings structure |
|||
|
|
array of SmsEventsEnum |
Events to notify of by SMS:
|
No |
|
|
string |
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 |
|
|
string |
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 |
|
EmailSettings structure |
|||
|
|
string |
The email address for sending notifications of campaign events. The default value is the user's email address. |
No |
|
|
int |
How often the traffic forecast is checked (in minutes). The default value is 60. Custom values are no longer supported. A notification is sent if the traffic forecast is lower than the one that the bid covered at the time of configuration. Can't be set for UnifiedCampaign. |
No |
|
|
int |
Minimum balance threshold (as a percentage of the last payment) that triggers a notification. The default value is 20. Custom values are no longer supported. If the client has the shared account enabled, this parameter is not used. Can't be set for UnifiedCampaign. |
No |
|
|
YesNoEnum |
Whether to send notifications of events related to the campaign. It is set for campaigns that have a personal Yandex manager. For campaigns that are not handled by a personal manager, the passed value is ignored. The default value is NO. Custom values are no longer supported. |
No |
|
|
YesNoEnum |
Whether to send email notifications. The default value is NO. Custom values are no longer supported. Can't be set for UnifiedCampaign. |
No |
Learn more
- update: TextCampaign parameters
- update: UnifiedCampaign parameters
- update: MobileAppCampaign parameters
Response
Response structure in JSON format:
{
"result": { /* result */
"UpdateResults": [{ /* ActionResult */
"Id": (long),
"Warnings": [{ /* ExceptionNotification */
"Code": (int), /* required */
"Message": (string), /* required */
"Details": (string)
}, ...
],
"Errors": [{ /* ExceptionNotification */
"Code": (int), /* required */
"Message": (string), /* required */
"Details": (string)
}, ...
]
}, ... ] /* required */
}
}
|
Parameter |
Type |
Description |
|
result structure (for JSON) / UpdateResponse structure (for SOAP) |
||
|
|
array of ActionResult |
Results of changing campaign parameters. |
|
ActionResult structure |
||
|
|
long |
The campaign ID. Returned if there aren't any errors. See the section Operations on object arrays. |
|
|
array of ExceptionNotification |
Warnings that occurred during the operation. |
|
|
array of ExceptionNotification |
Errors that occurred during the operation. |