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

# Configure time targeting

Uses the cURL utility

This example shows how to configure time targeting and hourly bid adjustments 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.

![](_assets/timetargeting-example.png)

To use this example, change the input data to include the OAuth token, the campaign ID, and the bid adjustments for each day of the week and each hour. 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,
      "TimeTargeting": {
        "Schedule": {
          "Items": [
            "1,0,0,0,0,0,0,0,0,0,80,80,100,100,100,100,100,120,150,150,150,120,100,80,0",
            "2,0,0,0,0,0,0,0,0,0,80,80,100,100,100,100,100,120,150,150,150,120,100,80,0",
            "3,0,0,0,0,0,0,0,0,0,80,80,100,100,100,100,100,120,150,150,150,120,100,80,0",
            "4,0,0,0,0,0,0,0,0,0,80,80,100,100,100,100,100,120,150,150,150,120,100,80,0",
            "5,0,0,0,0,0,0,0,0,0,80,80,100,100,100,100,100,170,200,200,200,170,100,80,0",
            "6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,100,100,100,100,100,100,100,100,100",
            "7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,100,100,100,100,100,100,100,100,100"
          ]
        },
        "ConsiderWorkingWeekends": "YES",
        "HolidaysSchedule": {
          "StartHour": 14,
          "EndHour": 24,
          "SuspendOnHolidays": "NO",
          "BidPercent": 100
        }
      }
    }]
  }
}' 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 -->


