# Schedule a budget increase

Schedules a budget increase. Works with Meta Ads.

```http
POST https://api.pozy.ai/v1/ads/high-demand-periods
```

- Area: Ads / Ad Accounts
- Auth: Authorization: Bearer pz_live_...

## Request body

Content type: `application/json`

- `accountId`, string, required
- `campaignId`, string
- `adSetId`, string
- `budgetValue`, number, required
- `budgetValueType`, string, required: One of `ABSOLUTE`, `MULTIPLIER`
- `timeStart`, integer, required
- `timeEnd`, integer, required
- `recurrenceType`, string: One of `ONE_TIME`, `WEEKLY`, `MONTHLY`
- `currency`, string

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/ads/high-demand-periods" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "696e0b682d0a31188e7a2ba9",
  "budgetValue": 12.5,
  "budgetValueType": "ABSOLUTE",
  "timeStart": 1,
  "timeEnd": 1
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/high-demand-periods", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    accountId: "696e0b682d0a31188e7a2ba9",
    budgetValue: 12.5,
    budgetValueType: "ABSOLUTE",
    timeStart: 1,
    timeEnd: 1
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/ads/high-demand-periods",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "accountId": "696e0b682d0a31188e7a2ba9",
        "budgetValue": 12.5,
        "budgetValueType": "ABSOLUTE",
        "timeStart": 1,
        "timeEnd": 1,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 201

- `objectId`, string
- `id`, string

```json
{
  "objectId": "6cd1b53a19a7e157d2d46b68",
  "id": "6bfebd43ddc270f6d2c56fc5"
}
```
