Training
For clients
Загружается...
The resource enables you to upload creatives that you can use for advertising. The creatives uploaded using this resource will be available only in the packages whose banner format has the "content" section.
Used object: Content
The request should have the type multipart/form-data. For the static.json and video.json methods, the "data" structure must contain values for the width and height parameters of the source creative.
Static images must be uploaded to https://ads.vk.ru/api/v2/content/static.json.
Videos must be uploaded to https://ads.vk.ru/api/v2/content/video.json.
HTML5 creatives must be uploaded to https://ads.vk.ru/api/v2/content/html5.json The file must meet the requirements for HTML5 banners (https://sales.mail.ru/ru/russia/main/latest/technical/#a75).
Request example:
curl -X POST -H "Authorization: Bearer LIDM…Io4Qj" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "file=@[object Object]" -F 'data={"width":1612, "height":980}' "https://ads.vk.ru/api/v2/content/static.json"
Response example:
{ "variants": { "original": { "url": "https://r.mradx.net/img/17/B36CF7.jpg", "width": 90, "height": 75, "size": 3339 } }, "id": 1084236 }
In case of an error the following response is returned:
{ "error": { "code": "validation_failed", "fields": { "file": "<error\>" }, "message": "Validation failed" } }
Possible errors for static.json and video.json:
Possible errors for html5.json:
For error details, see the "message" field.