---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.2
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/reference/DeleteBanners.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/reference/DeleteBanners.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# DeleteBanners
Deletes ads.

{% note alert %}

Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions 4 and 5, see the [Migration guide](https://yandex.com/dev/direct/doc/migration/concepts/methods.md).

{% endnote %}


The [DeleteBanners (Live)](https://yandex.com/dev/direct/doc/dg-v4/en/live/DeleteBanners.md) version also exists for this method.

When deleting ads, their entries in the database are deleted. This means you cannot get any type of information about a deleted ad.

You can only delete an ad that has not been displayed and does not have any statistics yet. For other ads, archiving is available using the [ArchiveBanners](https://yandex.com/dev/direct/doc/dg-v4/en/reference/ArchiveBanners.md) method.


## Input data {#input}

The input data structure in JSON is shown below.

```javascript
{
   "method": "DeleteBanners",
   "param": {
      /* CampaignBidsInfo */
      "CampaignID": (int),
      "BannerIDS": [
         (long)
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >CampaignBidsInfo object</sub>**
||
||
`CampaignID`
|
The campaign ID.
|
Yes
||
||
`BannerIDS`
|
Array containing IDs of ads to delete (no more than 2000 IDs).
|
Yes
||
|#


## Output data {#output}

Returns 1 when deleted successfully, as shown in the following example.

```javascript
{
   "data": 1
}
```


## Examples of input data {#example}

## Python

```python
{
   'CampaignID': 3665578,
   'BannerIDS': [20155899]
}
```

## PHP

```php
array(
   'CampaignID' => 3665578,
   'BannerIDS' => array(20155899)
)
```

## Perl

```perl
{
   'CampaignID' => 3665578,
   'BannerIDS' => [20155899]
}
```

