---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/direct/doc/en/curl-ads-launch.md
  - https://yandex.ru/dev/direct/doc/ru/curl-ads-launch.md
  - href: en/curl-ads-launch.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/examples/curl-ads-launch.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/en/llms.txt

# Stop and start ads

Uses the cURL utility

This example shows how to stop serving ads using the [Ads](https://yandex.com/dev/direct/doc/ads/ads.html).[suspend](https://yandex.com/dev/direct/doc/ads/suspend.html) method and restart using the [Ads](https://yandex.com/dev/direct/doc/ads/ads.html).[resume](https://yandex.com/dev/direct/doc/ads/resume.html) method. For instance, you can pause and resume your ads based on product inventory levels. This helps you avoid wasting money on promoting out-of-stock items.

To use the examples, specify the OAuth token and ad IDs in the input data. If you're submitting a request on behalf of an agency, be sure to include the client's login.

## Stop

```text translate=no
curl \
  -H 'Authorization: Bearer ТОКЕН' \
  -H 'Client-Login: ЛОГИН_КЛИЕНТА' \
  -d '{ "method": "suspend",
  "params": {
    "SelectionCriteria": {
      "Ids": [ИДЕНТИФИКАТОР_1,ИДЕНТИФИКАТОР_2,...,ИДЕНТИФИКАТОР_N]
    }
  }
}' https://api.direct.yandex.com/json/v501/ads
```

## Start

```text translate=no
curl \
  -H 'Authorization: Bearer ТОКЕН' \
  -H 'Client-Login: ЛОГИН_КЛИЕНТА' \
  -d '{ "method": "resume",
  "params": {
    "SelectionCriteria": {
      "Ids": [ИДЕНТИФИКАТОР_1,ИДЕНТИФИКАТОР_2,...,ИДЕНТИФИКАТОР_N]
    }
  }
}' https://api.direct.yandex.com/json/v501/ads
```

<!-- source: en/_includes/curl-bids/id-curl-bids/curl-win.md -->
{% note info %}

For cURL in Windows, replace all single quotes with double quotes, and escape double quotes in JSON code. For example: `-d "{\"method\"`...

{% endnote %}
<!-- endsource: en/_includes/curl-bids/id-curl-bids/curl-win.md -->
