Developers » API methods » Ads API » ads.updateAds
Ads APIads.updateAds
Edits ads.
Please note! Allowed number of ads edited in one request is 20. Minimum size of ad audience is 50 people.

This method can be called with a user token. Access rights required: ads.
Parameters
account_idAdvertising account ID.
required parameter, int (number)
dataSerialized JSON array of objects that describe changes in ads. Description of ad_edit_specification objects see below.
required parameter, string
ad_edit_specification
ad_id
integer, required
Ad ID.
cpc
number
If cost_type = 0 cost per click. The price is given in rubles with kopecks after the decimal point.
cpm
number
If cost_type = 1 cost per 1000 impressions. The price is given in rubles with kopecks after the decimal point.
impressions_limit
integer
If ad_format = 9 limitation to impressions number per user. Possible values: 1, 2, 3, 5, 10, 15, 20.
impressions_limited
integer, [1]
if cost_type = 1 and impressions_limit cannot be set. 1 not more than 100 impressions per user.
ad_platform
integer, string
Ad platforms. Possible values:
    • (if ad_format = 1)
    • 0 VK and partners sites;
    • 1 VK only.
    • (if ad_format = 9)
    • all all platforms;
    • desktop web version;
    • mobile mobile version and apps.
ad_platform_no_wall
integer, [1]
For ad_format = 9 only. 1 don't show on communities walls (by default: 0).
all_limit
integer
Total spending limit for the ad a whole number of rubles.
category1_id
integer
ID of ad theme or sub-theme. If the ad has several themes, additional can be set in category2_id. See ads.getCategories.
category2_id
integer
ID of ad theme or sub-theme.
age_restriction
integer
age restriction. Possible values:
  • 0 none;
  • 1 0+;
  • 2 6+;
  • 3 12+;
  • 4 16+;
  • 5 18+.
status
integer, [0,1]
Ad status. Possible values:
  • 0 stopped;
  • 1 launched.
name
string, 3 to 60 symbols
Ad name (for internal identification and statistics).
title
string, 3 to 60 symbols
Ad title.
description
string, 3 to 60 symbols
Ad description.
link_url
string
A link to the advertised object in the format
http://yoursite.cm
or
http://vk.cm/club1
If the link has "{ad_id}" or "{campaign_id}", they are replaced with the id of the ad or campaign, respectively, when a user clicks the link.
link_domain
string
The advertised domain in the format
http://yoursite.cm

photo
string
This value is returned after a successful photo upload.
video
string
This value is returned after a successful video upload.
disclaimer_medical
integer, [1]
1 "Attention: Be sure to read contra indications before use" warning is shown.
disclaimer_specialist
integer, [1]
1 "Attention: Consult a specialist before using" warning is shown.
disclaimer_supplements
integer, [1]
1 "Attention: A bioactive nutrient, is not a medicine" warning is shown.
Targeting settingsTargeting settings. See description below.

Targeting settings
sex
integer, [0,1,2]
Sex. Possible values:
  • 0 any;
  • 1 female;
  • 2 male.
age_from
integer
Minimum age. (0 not set).
age_to
integer
Maximum age. (0 not set).
birthday
integer
Birthday. Set as sum of flags:
  • +1 today;
  • +2 tomorrow;
  • +4 next week.
country
integer
Country ID. (0 not set).
cities
string
Cities and regions IDs separated by comma. Regions IDs should be set with minus.
cities_not
string
Cities and regions that must be withdrawn from targeting separated by comma. Regions IDs should be set with minus.
geo_near
string
places for geo-targeting. List of points separated by ";". Each point describes by the string <latitude>,<longitude>,<radius>[,place title].
Latitude and longitude are set as a decimal degrees, radius is from the list of possible values in meters: 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000, 55000, 60000, 65000, 70000, 75000, 80000, 85000, 90000, 95000, 100000. This criteria cannot be used simultaneously with ''country, cities and cities_not.
statuses'''
string
Relationship status (values separated by comma). Possible values:
  • 1 Single;
  • 2 In a relationship;
  • 3 Engaged;
  • 4 Married;
  • 5 It's complicated;
  • 6 Actively searching;
  • 7 In love.
groups
string
Communities IDs separated by comma.
groups_not
string
Communities IDs that must be withdrawn from targeting separated by comma.
apps
string
Applications IDs separated by comma.
apps_not
string
Applications IDs that must be withdrawn from targeting separated by comma.
districts
string
City districts IDs separated by comma.
stations
string
Subway stations IDs separated by comma.
streets
string
Streets IDs separated by comma.
schools
string
Schools IDs separated by comma.
universities
string
Universities IDs separated by comma.
positions
string
Job positions IDs separated by comma.
religions
string
Religious views IDs separated by comma.
interests
string
Interests.
browsers
string
Browsers and devices.
interest_categories
string
Interests categories.
user_devices
string
Devices.
user_os
string
Operating systems.
user_browsers
string
Internet browsers.
retargeting_groups
string
Retargeting groups IDs separated by comma..
retargeting_groups_not
string
IDs of retargeting groups that must be withdrawn from targeting.
paying
integer, [1,2]
Payments. Possible values:
  • 1 didn't use VK payments;
  • 2 used VK payments.
 
travellers
integer, [0,1]
Travellers only.
  • 1 enable this filter.
school_from
integer
School graduation year minimum (0 not set).
school_to
integer
School graduation year maximum (0 not set).
uni_from
integer
University graduation year minimum (0 not set).
uni_to
integer
University graduation year maximum (0 not set).
Result
Returns an array of responses for each request in data array. Respective object in an output array contains ID of the edited client and in case of error error_code and error_desc fields.
Errors
601Permission denied. You have requested too many actions this day. Try later.
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
5.59
Images sizes requeriments for advertisments has been updated. See this page for a further information.
5.16
Schools field is divided into two fields: schools and universities. Their id field is correct now.