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

# Change the strategy

Uses the cURL utility

The example shows how to configure the “Optimize clicks” strategy (with impressions enabled in search results and ad networks) using the [Campaigns](https://yandex.com/dev/direct/docref-v5/campaigns/campaigns.md).[update](https://yandex.com/dev/direct/docref-v5/campaigns/update.md) method.

To use this example, the input data must include the OAuth token, the campaign ID, and the amount of the weekly budget (multiplied by 1 000 000). If you're submitting a request on behalf of an agency, be sure to include the client's login.

```
curl \
  -H 'Authorization: Bearer TOKEN' \
  -H 'Client-Login: CLIENT_LOGIN' \
  -d '{ "method": "update",
  "params": {
    "Campaigns": [{
      "Id": CAMPAIGN_ID,
      "TextCampaign": {
        "BiddingStrategy": {
          "Search": {
            "BiddingStrategyType": "WB_MAXIMUM_CLICKS",
            "WbMaximumClicks": {
              "WeeklySpendLimit": BUDGET_AMOUNT
            }
          },
          "Network": { 
            "BiddingStrategyType": "NETWORK_DEFAULT",
            "NetworkDefault": {  }
          }
        }
      }
    }]
  }
}' https://api.direct.yandex.com/json/v501/campaigns
```

<!-- 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 -->


