node-vk-sdk
Version:
VK API SDK for Node.js
1,725 lines • 590 kB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"methods": [
{
"name": "account.ban",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "owner_id",
"type": "integer"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "account.changePassword",
"description": "Changes a user password after access is successfully restored with the [vk.com/dev/auth.restore|auth.restore] method.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "restore_sid",
"description": "Session id received after the [vk.com/dev/auth.restore|auth.restore] method is executed. (If the password is changed right after the access was restored)",
"type": "string"
},
{
"name": "change_password_hash",
"description": "Hash received after a successful OAuth authorization with a code got by SMS. (If the password is changed right after the access was restored)",
"type": "string"
},
{
"name": "old_password",
"description": "Current user password.",
"type": "string"
},
{
"name": "new_password",
"description": "New password that will be set as a current",
"type": "string",
"required": true,
"minLength": 6
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_changePassword_response"
}
}
},
{
"name": "account.getActiveOffers",
"description": "Returns a list of active ads (offers) which executed by the user will bring him/her respective number of votes to his balance in the application.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "offset",
"type": "integer",
"default": 0,
"minimum": 0
},
{
"name": "count",
"description": "Number of results to return.",
"type": "integer",
"default": 100,
"minimum": 0,
"maximum": 100
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_getActiveOffers_response"
}
}
},
{
"name": "account.getAppPermissions",
"description": "Gets settings of the user in this application.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "user_id",
"description": "User ID whose settings information shall be got. By default: current user.",
"type": "integer",
"required": true,
"minimum": 0
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_getAppPermissions_response"
}
}
},
{
"name": "account.getBanned",
"description": "Returns a user's blacklist.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "offset",
"description": "Offset needed to return a specific subset of results.",
"type": "integer",
"minimum": 0
},
{
"name": "count",
"description": "Number of results to return.",
"type": "integer",
"default": 20,
"minimum": 0,
"maximum": 200
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_getBanned_response"
}
}
},
{
"name": "account.getCounters",
"description": "Returns non-null values of user counters.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "filter",
"description": "Counters to be returned.",
"type": "array",
"items": {
"type": "string",
"enum": [
"friends",
"messages",
"photos",
"videos",
"notes",
"gifts",
"events",
"groups",
"sdk",
"friends_suggestions"
]
}
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_getCounters_response"
}
}
},
{
"name": "account.getInfo",
"description": "Returns current account info.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "fields",
"description": "Fields to return. Possible values: *'country' — user country,, *'https_required' — is \"HTTPS only\" option enabled,, *'own_posts_default' — is \"Show my posts only\" option is enabled,, *'no_wall_replies' — are wall replies disabled or not,, *'intro' — is intro passed by user or not,, *'lang' — user language. By default: all.",
"type": "array",
"items": {
"type": "string",
"enum": [
"country",
"https_required",
"own_posts_default",
"no_wall_replies",
"intro",
"lang"
]
}
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_getInfo_response"
}
}
},
{
"name": "account.getProfileInfo",
"description": "Returns the current account info.",
"access_token_type": [
"user"
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_getProfileInfo_response"
}
}
},
{
"name": "account.getPushSettings",
"description": "Gets settings of push notifications.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "device_id",
"description": "Unique device ID.",
"type": "string"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_getPushSettings_response"
}
}
},
{
"name": "account.registerDevice",
"description": "Subscribes an iOS/Android/Windows Phone-based device to receive push notifications",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "token",
"description": "Device token used to send notifications. (for mpns, the token shall be URL for sending of notifications)",
"type": "string",
"required": true
},
{
"name": "device_model",
"description": "String name of device model.",
"type": "string"
},
{
"name": "device_year",
"description": "Device year.",
"type": "integer"
},
{
"name": "device_id",
"description": "Unique device ID.",
"type": "string",
"required": true
},
{
"name": "system_version",
"description": "String version of device operating system.",
"type": "string"
},
{
"name": "settings",
"description": "Push settings in a [vk.com/dev/push_settings|special format].",
"type": "string"
},
{
"name": "sandbox",
"type": "boolean",
"default": 0
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "account.saveProfileInfo",
"description": "Edits current profile info.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "first_name",
"description": "User first name.",
"type": "string"
},
{
"name": "last_name",
"description": "User last name.",
"type": "string"
},
{
"name": "maiden_name",
"description": "User maiden name (female only)",
"type": "string"
},
{
"name": "screen_name",
"description": "User screen name.",
"type": "string"
},
{
"name": "cancel_request_id",
"description": "ID of the name change request to be canceled. If this parameter is sent, all the others are ignored.",
"type": "integer",
"minimum": 0
},
{
"name": "sex",
"description": "User sex. Possible values: , * '1' – female,, * '2' – male.",
"type": "integer",
"minimum": 0,
"enum": [
0,
1,
2
],
"enumNames": [
"undefined",
"female",
"male"
]
},
{
"name": "relation",
"description": "User relationship status. Possible values: , * '1' – single,, * '2' – in a relationship,, * '3' – engaged,, * '4' – married,, * '5' – it's complicated,, * '6' – actively searching,, * '7' – in love,, * '0' – not specified.",
"type": "integer",
"minimum": 0,
"enum": [
1,
2,
3,
4,
5,
6,
7,
0
],
"enumNames": [
"single",
"relationship",
"engaged",
"married",
"complicated",
"actively searching",
"in love",
"not specified"
]
},
{
"name": "relation_partner_id",
"description": "ID of the relationship partner.",
"type": "integer",
"minimum": 0
},
{
"name": "bdate",
"description": "User birth date, format: DD.MM.YYYY.",
"type": "string"
},
{
"name": "bdate_visibility",
"description": "Birth date visibility. Returned values: , * '1' – show birth date,, * '2' – show only month and day,, * '0' – hide birth date.",
"type": "integer",
"minimum": 0,
"enum": [
1,
2,
0
],
"enumNames": [
"show",
"hide year",
"hide"
]
},
{
"name": "home_town",
"description": "User home town.",
"type": "string"
},
{
"name": "country_id",
"description": "User country.",
"type": "integer",
"minimum": 0
},
{
"name": "city_id",
"description": "User city.",
"type": "integer",
"minimum": 0
},
{
"name": "status",
"description": "Status text.",
"type": "string"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/account_saveProfileInfo_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_invalid_address"
}
]
},
{
"name": "account.setInfo",
"description": "Allows to edit the current account info.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "name",
"description": "Setting name.",
"type": "string"
},
{
"name": "value",
"description": "Setting value.",
"type": "string"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "account.setNameInMenu",
"description": "Sets an application screen name (up to 17 characters), that is shown to the user in the left menu.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "user_id",
"description": "User ID.",
"type": "integer",
"required": true,
"minimum": 0
},
{
"name": "name",
"description": "Application screen name.",
"type": "string"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_access_menu"
}
]
},
{
"name": "account.setOffline",
"description": "Marks a current user as offline.",
"access_token_type": [
"user"
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "account.setOnline",
"description": "Marks the current user as online for 15 minutes.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "voip",
"description": "'1' if videocalls are available for current device.",
"type": "boolean"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "account.setPushSettings",
"description": "Change push settings.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "device_id",
"description": "Unique device ID.",
"type": "string",
"required": true
},
{
"name": "settings",
"description": "Push settings in a [vk.com/dev/push_settings|special format].",
"type": "string"
},
{
"name": "key",
"description": "Notification key.",
"type": "string"
},
{
"name": "value",
"description": "New value for the key in a [vk.com/dev/push_settings|special format].",
"type": "array",
"items": {
"type": "string"
}
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "account.setSilenceMode",
"description": "Mutes push notifications for the set period of time.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "device_id",
"description": "Unique device ID.",
"type": "string"
},
{
"name": "time",
"description": "Time in seconds for what notifications should be disabled. '-1' to disable forever.",
"type": "integer"
},
{
"name": "peer_id",
"description": "Destination ID. \"For user: 'User ID', e.g. '12345'. For chat: '2000000000' + 'Chat ID', e.g. '2000000001'. For community: '- Community ID', e.g. '-12345'. \"",
"type": "integer"
},
{
"name": "sound",
"description": "'1' — to enable sound in this dialog, '0' — to disable sound. Only if 'peer_id' contains user or community ID.",
"type": "integer"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "account.unban",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "owner_id",
"type": "integer"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "account.unregisterDevice",
"description": "Unsubscribes a device from push notifications.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "device_id",
"description": "Unique device ID.",
"type": "string"
},
{
"name": "sandbox",
"type": "boolean",
"default": 0
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
}
},
{
"name": "ads.addOfficeUsers",
"description": "Adds managers and/or supervisors to advertising account.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "data",
"description": "Serialized JSON array of objects that describe added managers. Description of 'user_specification' objects see below.",
"type": "array",
"required": true,
"format": "json",
"items": {
"$ref": "objects.json#/definitions/ads_user_specification_cutted"
},
"minItems": 1,
"maxItems": 10
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_addOfficeUsers_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.checkLink",
"description": "Allows to check the ad link.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "link_type",
"description": "Object type: *'community' — community,, *'post' — community post,, *'application' — VK application,, *'video' — video,, *'site' — external site.",
"type": "string",
"required": true,
"enum": [
"community",
"post",
"application",
"video",
"site"
]
},
{
"name": "link_url",
"description": "Object URL.",
"type": "string",
"required": true
},
{
"name": "campaign_id",
"description": "Campaign ID",
"type": "integer"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_checkLink_response"
}
}
},
{
"name": "ads.createAds",
"description": "Creates ads.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "data",
"description": "Serialized JSON array of objects that describe created ads. Description of 'ad_specification' objects see below.",
"type": "string",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_createAds_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_ads_partial_success"
},
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.createCampaigns",
"description": "Creates advertising campaigns.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "data",
"description": "Serialized JSON array of objects that describe created campaigns. Description of 'campaign_specification' objects see below.",
"type": "string",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_createCampaigns_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_ads_partial_success"
},
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.createClients",
"description": "Creates clients of an advertising agency.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "data",
"description": "Serialized JSON array of objects that describe created campaigns. Description of 'client_specification' objects see below.",
"type": "string",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_createClients_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_ads_partial_success"
},
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.createTargetGroup",
"description": "Creates a group to re-target ads for users who visited advertiser's site (viewed information about the product, registered, etc.).",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "client_id",
"description": "'Only for advertising agencies.', ID of the client with the advertising account where the group will be created.",
"type": "integer"
},
{
"name": "name",
"description": "Name of the target group — a string up to 64 characters long.",
"type": "string",
"required": true
},
{
"name": "lifetime",
"description": "'For groups with auditory created with pixel code only.', , Number of days after that users will be automatically removed from the group.",
"type": "integer",
"required": true,
"minimum": 1,
"maximum": 720
},
{
"name": "target_pixel_id",
"type": "integer"
},
{
"name": "target_pixel_rules",
"type": "string"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_createTargetGroup_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.deleteAds",
"description": "Archives ads.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "ids",
"description": "Serialized JSON array with ad IDs.",
"type": "string",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_deleteAds_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_ads_object_deleted"
},
{
"$ref": "errors.json#/errors/api_error_ads_partial_success"
},
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.deleteCampaigns",
"description": "Archives advertising campaigns.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "ids",
"description": "Serialized JSON array with IDs of deleted campaigns.",
"type": "string",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_deleteCampaigns_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_ads_object_deleted"
},
{
"$ref": "errors.json#/errors/api_error_ads_partial_success"
},
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.deleteClients",
"description": "Archives clients of an advertising agency.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "ids",
"description": "Serialized JSON array with IDs of deleted clients.",
"type": "string",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_deleteClients_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_ads_object_deleted"
},
{
"$ref": "errors.json#/errors/api_error_ads_partial_success"
},
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.deleteTargetGroup",
"description": "Deletes a retarget group.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "client_id",
"description": "'Only for advertising agencies.' , ID of the client with the advertising account where the group will be created.",
"type": "integer"
},
{
"name": "target_group_id",
"description": "Group ID.",
"type": "integer",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/base_ok_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getAccounts",
"description": "Returns a list of advertising accounts.",
"access_token_type": [
"user"
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getAccounts_response"
}
}
},
{
"name": "ads.getAds",
"description": "Returns number of ads.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"required": true,
"type": "integer"
},
{
"name": "ad_ids",
"description": "Filter by ads. Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.",
"type": "string"
},
{
"name": "campaign_ids",
"description": "Filter by advertising campaigns. Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.",
"type": "string"
},
{
"name": "client_id",
"description": "'Available and required for advertising agencies.' ID of the client ads are retrieved from.",
"type": "integer"
},
{
"name": "include_deleted",
"description": "Flag that specifies whether archived ads shall be shown: *0 — show only active ads,, *1 — show all ads.",
"type": "boolean"
},
{
"name": "only_deleted",
"description": "Flag that specifies whether to show only archived ads: *0 — show all ads,, *1 — show only archived ads. Available when include_deleted flag is *1",
"type": "boolean"
},
{
"name": "limit",
"description": "Limit of number of returned ads. Used only if ad_ids parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.",
"type": "integer"
},
{
"name": "offset",
"description": "Offset. Used in the same cases as 'limit' parameter.",
"type": "integer"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getAds_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getAdsLayout",
"description": "Returns descriptions of ad layouts.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"required": true,
"type": "integer"
},
{
"name": "ad_ids",
"description": "Filter by ads. Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.",
"type": "string"
},
{
"name": "campaign_ids",
"description": "Filter by advertising campaigns. Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.",
"type": "string"
},
{
"name": "client_id",
"description": "'For advertising agencies.' ID of the client ads are retrieved from.",
"type": "integer"
},
{
"name": "include_deleted",
"description": "Flag that specifies whether archived ads shall be shown. *0 — show only active ads,, *1 — show all ads.",
"type": "boolean"
},
{
"name": "limit",
"description": "Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.",
"type": "integer"
},
{
"name": "offset",
"description": "Offset. Used in the same cases as 'limit' parameter.",
"type": "integer"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getAdsLayout_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getAdsTargeting",
"description": "Returns ad targeting parameters.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"required": true,
"type": "integer"
},
{
"name": "ad_ids",
"description": "Filter by ads. Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.",
"type": "string"
},
{
"name": "campaign_ids",
"description": "Filter by advertising campaigns. Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.",
"type": "string"
},
{
"name": "client_id",
"description": "'For advertising agencies.' ID of the client ads are retrieved from.",
"type": "integer"
},
{
"name": "include_deleted",
"description": "flag that specifies whether archived ads shall be shown: *0 — show only active ads,, *1 — show all ads.",
"type": "boolean"
},
{
"name": "limit",
"description": "Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.",
"type": "integer"
},
{
"name": "offset",
"description": "Offset needed to return a specific subset of results.",
"type": "integer"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getAdsTargeting_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getBudget",
"description": "Returns current budget of the advertising account.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getBudget_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getCampaigns",
"description": "Returns a list of campaigns in an advertising account.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "client_id",
"description": "'For advertising agencies'. ID of the client advertising campaigns are retrieved from.",
"type": "integer"
},
{
"name": "include_deleted",
"description": "Flag that specifies whether archived ads shall be shown. *0 — show only active campaigns,, *1 — show all campaigns.",
"type": "boolean"
},
{
"name": "campaign_ids",
"description": "Filter of advertising campaigns to show. Serialized JSON array with campaign IDs. Only campaigns that exist in 'campaign_ids' and belong to the specified advertising account will be shown. If the parameter is null, all campaigns will be shown.",
"type": "string"
},
{
"name": "fields",
"type": "array",
"items": {
"type": "string",
"enum": [
"ads_count"
]
}
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getCampaigns_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getCategories",
"description": "Returns a list of possible ad categories.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "lang",
"description": "Language. The full list of supported languages is [vk.com/dev/api_requests|here].",
"type": "string"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getCategories_response"
}
}
},
{
"name": "ads.getClients",
"description": "Returns a list of advertising agency's clients.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getClients_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getDemographics",
"description": "Returns demographics for ads or campaigns.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "ids_type",
"description": "Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns.",
"type": "string",
"required": true,
"enum": [
"ad",
"campaign"
]
},
{
"name": "ids",
"description": "IDs requested ads or campaigns, separated with a comma, depending on the value set in 'ids_type'. Maximum 2000 objects.",
"type": "string",
"required": true
},
{
"name": "period",
"description": "Data grouping by dates: *day — statistics by days,, *month — statistics by months,, *overall — overall statistics. 'date_from' and 'date_to' parameters set temporary limits.",
"type": "string",
"required": true,
"enum": [
"day",
"month",
"overall"
]
},
{
"name": "date_from",
"description": "Date to show statistics from. For different value of 'period' different date format is used: *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011, **0 — day it was created on,, *month: YYYY-MM, example: 2011-09 — September 2011, **0 — month it was created in,, *overall: 0.",
"type": "string",
"required": true
},
{
"name": "date_to",
"description": "Date to show statistics to. For different value of 'period' different date format is used: *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011, **0 — current day,, *month: YYYY-MM, example: 2011-09 — September 2011, **0 — current month,, *overall: 0.",
"type": "string",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getDemographics_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getFloodStats",
"description": "Returns information about current state of a counter — number of remaining runs of methods and time to the next counter nulling in seconds.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getFloodStats_response"
}
}
},
{
"name": "ads.getLookalikeRequests",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"type": "integer",
"required": true
},
{
"name": "client_id",
"type": "integer"
},
{
"name": "requests_ids",
"type": "string"
},
{
"name": "offset",
"type": "integer",
"default": 0,
"minimum": 0
},
{
"name": "limit",
"type": "integer",
"default": 10,
"minimum": 0,
"maximum": 200
},
{
"name": "sort_by",
"type": "string",
"default": "id"
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getLookalikeRequests_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getMusicians",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "artist_name",
"type": "string",
"required": true,
"minLength": 3
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getMusicians_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
},
{
"$ref": "errors.json#/errors/api_error_not_found"
}
]
},
{
"name": "ads.getOfficeUsers",
"description": "Returns a list of managers and supervisors of advertising account.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getOfficeUsers_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getPostsReach",
"description": "Returns detailed statistics of promoted posts reach from campaigns and ads.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "ids_type",
"description": "Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns.",
"type": "string",
"required": true,
"enum": [
"ad",
"campaign"
]
},
{
"name": "ids",
"description": "IDs requested ads or campaigns, separated with a comma, depending on the value set in 'ids_type'. Maximum 100 objects.",
"type": "string",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getPostsReach_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getRejectionReason",
"description": "Returns a reason of ad rejection for pre-moderation.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "ad_id",
"description": "Ad ID.",
"type": "integer",
"required": true
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getRejectionReason_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getStatistics",
"description": "Returns statistics of performance indicators for ads, campaigns, clients or the whole account.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "ids_type",
"description": "Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns,, *client — clients,, *office — account.",
"type": "string",
"required": true,
"enum": [
"ad",
"campaign",
"client",
"office"
]
},
{
"name": "ids",
"description": "IDs requested ads, campaigns, clients or account, separated with a comma, depending on the value set in 'ids_type'. Maximum 2000 objects.",
"type": "string",
"required": true
},
{
"name": "period",
"description": "Data grouping by dates: *day — statistics by days,, *month — statistics by months,, *overall — overall statistics. 'date_from' and 'date_to' parameters set temporary limits.",
"type": "string",
"required": true,
"enum": [
"day",
"month",
"overall"
]
},
{
"name": "date_from",
"description": "Date to show statistics from. For different value of 'period' different date format is used: *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011, **0 — day it was created on,, *month: YYYY-MM, example: 2011-09 — September 2011, **0 — month it was created in,, *overall: 0.",
"type": "string",
"required": true
},
{
"name": "date_to",
"description": "Date to show statistics to. For different value of 'period' different date format is used: *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011, **0 — current day,, *month: YYYY-MM, example: 2011-09 — September 2011, **0 — current month,, *overall: 0.",
"type": "string",
"required": true
},
{
"name": "stats_fields",
"description": "Additional fields to add to statistics",
"type": "array",
"items": {
"type": "string",
"enum": [
"views_times"
]
}
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getStatistics_response"
}
},
"errors": [
{
"$ref": "errors.json#/errors/api_error_weighted_flood"
}
]
},
{
"name": "ads.getSuggestions",
"description": "Returns a set of auto-suggestions for various targeting parameters.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "section",
"description": "Section, suggestions are retrieved in. Available values: *countries — request of a list of countries. If q is not set or blank, a short list of countries is shown. Otherwise, a full list of countries is shown. *regions — requested list of regions. 'country' parameter is required. *cities — requested list of cities. 'country' parameter is required. *districts — requested list of districts. 'cities' parameter is required. *stations — requested list of subway stations. 'cities' parameter is required. *streets — requested list of streets. 'cities' parameter is required. *schools — requested list of educational organizations. 'cities' parameter is required. *interests — requested list of interests. *positions — requested list of positions (professions). *group_types — requested list of group types. *religions — requested list of religious commitments. *browsers — requested list of browsers and mobile devices.",
"type": "string",
"required": true,
"enum": [
"countries",
"regions",
"cities",
"districts",
"stations",
"streets",
"schools",
"interests",
"positions",
"group_types",
"religions",
"browsers"
]
},
{
"name": "ids",
"description": "Objects IDs separated by commas. If the parameter is passed, 'q, country, cities' should not be passed.",
"type": "string"
},
{
"name": "q",
"description": "Filter-line of the request (for countries, regions, cities, streets, schools, interests, positions).",
"type": "string"
},
{
"name": "country",
"description": "ID of the country objects are searched in.",
"type": "integer"
},
{
"name": "cities",
"description": "IDs of cities where objects are searched in, separated with a comma.",
"type": "string"
},
{
"name": "lang",
"description": "Language of the returned string values. Supported languages: *ru — Russian,, *ua — Ukrainian,, *en — English.",
"type": "string",
"enum": [
"ru",
"ua",
"en"
],
"enumNames": [
"russian",
"ukrainian",
"english"
]
}
],
"responses": {
"response": {
"$ref": "responses.json#/definitions/ads_getSuggestions_response"
},
"regionsResponse": {
"$ref": "responses.json#/definitions/ads_getSuggestions_regions_response"
},
"citiesResponse": {
"$ref": "responses.json#/definitions/ads_getSuggestions_cities_response"
},
"schoolsResponse": {
"$ref": "responses.json#/definitions/ads_getSuggestions_schools_response"
}
}
},
{
"name": "ads.getTargetGroups",
"description": "Returns a list of target groups.",
"access_token_type": [
"user"
],
"parameters": [
{
"name": "account_id",
"description": "Advertising account ID.",
"type": "integer",
"required": true
},
{
"name": "client_id",
"description": "'Only for