# Update an ad set

Updates an ad set.

```http
PUT https://api.pozy.ai/v1/ads/ad-sets/{adSetId}
```

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

## Path parameters

- `adSetId` (string, required)

## Request body

Content type: `application/json`

- `platform`, string, required: One of `facebook`, `instagram`, `tiktok`, `linkedin`, `pinterest`, `google`, `twitter`, `openai`, `reddit`
- `budget`, object
  - `amount`, number
  - `type`, string: One of `daily`, `lifetime`
- `status`, string: One of `active`, `paused`
- `name`, string: Up to 255 characters
- `bidStrategy`, object
- `dsaBeneficiary`, string: 1 to 100 characters
- `dsaPayor`, string: 1 to 100 characters
- `regionalRegulatedCategories`, array of string
- `regionalRegulationIdentities`, map of string or integer
- `smartTargeting`, object
  - `audience`, boolean
  - `interestsBehaviors`, boolean
- `placements`, object: Can be null
  - `publisherPlatforms`, array of string: Each item: one of `facebook`, `instagram`, `threads`, `messenger`, `audience_network`, `whatsapp`
  - `facebookPositions`, array of string: Each item: one of `feed`, `right_hand_column`, `marketplace`, `story`, `search`, `instream_video`, `facebook_reels`, `facebook_reels_overlay`, `profile_feed`, `notification`
  - `instagramPositions`, array of string: Each item: one of `stream`, `story`, `explore`, `explore_home`, `reels`, `profile_feed`, `ig_search`, `profile_reels`
  - `messengerPositions`, array of string: Each item: one of `messenger_home`, `sponsored_messages`, `story`
  - `audienceNetworkPositions`, array of string: Each item: one of `classic`, `rewarded_video`
  - `threadsPositions`, array of string: Each item: one of `threads_stream`
  - `whatsappPositions`, array of string: Each item: one of `status`
  - `devicePlatforms`, array of string: Each item: one of `mobile`, `desktop`
- `startDate`, string
- `endDate`, string: Can be null
- `targeting`, object
  - `userOs`, array of string: At least 1 item
  - `userDevice`, array of string: At least 1 item
  - `countries`, array of string
  - `regions`, array of string or object
    - one of: string
    - one of: Option 2
      - `key`, string, required
      - `name`, string
  - `cities`, array of string or object
    - one of: string
    - one of: Option 2
      - `key`, string, required
      - `name`, string
      - `radius`, number
      - `distanceUnit`, string: One of `mile`, `kilometer`
  - `zips`, array of object
    - `key`, string, required
    - `name`, string
  - `metros`, array of object
    - `key`, string, required
    - `name`, string
  - `countryGroups`, array of string: Each item: one of `africa`, `asia`, `europe`, `north_america`, `south_america`, `oceania`, `central_america`, `caribbean`, `eea`, `euro_area`, `nafta`, `mercosur`, `afta`, `apec`, `gcc`, `cisfta`, `emerging_markets`, `itunes_app_store`, `android_free_store`, `android_paid_store`
  - `customLocations`, array of object
    - `latitude`, number, required: -90 to 90
    - `longitude`, number, required: -180 to 180
    - `radius`, number, required
    - `distanceUnit`, string, required: One of `mile`, `kilometer`
    - `name`, string
    - `address`, string
  - `excludedLocations`, object
    - `countries`, array of string
    - `countryGroups`, array of string: Each item: one of `africa`, `asia`, `europe`, `north_america`, `south_america`, `oceania`, `central_america`, `caribbean`, `eea`, `euro_area`, `nafta`, `mercosur`, `afta`, `apec`, `gcc`, `cisfta`, `emerging_markets`, `itunes_app_store`, `android_free_store`, `android_paid_store`
    - `regions`, array of object
      - `key`, string, required
      - `name`, string
    - `cities`, array of object
      - `key`, string, required
      - `radius`, number
      - `distanceUnit`, string: One of `mile`, `kilometer`
    - `zips`, array of object
      - `key`, string, required
      - `name`, string
    - `places`, array of object
      - `key`, string, required
    - `neighborhoods`, array of object
      - `key`, string, required
    - `customLocations`, array of object
      - `latitude`, number, required: -90 to 90
      - `longitude`, number, required: -180 to 180
      - `radius`, number, required
      - `distanceUnit`, string, required: One of `mile`, `kilometer`
      - `name`, string
      - `address`, string
  - `ageMin`, integer: 13 to 100
  - `ageMax`, integer: 13 to 100
  - `gender`, string: One of `all`, `male`, `female`
  - `incomeTier`, string: One of `top_5`, `top_10`, `top_10_25`, `top_25_50`
  - `languages`, array of string
  - `interests`, array of object
    - `id`, string, required
    - `name`, string
  - `behaviors`, array of object
    - `id`, string, required
    - `name`, string
  - `workPositions`, array of object
    - `id`, string, required
    - `name`, string
  - `workEmployers`, array of object
    - `id`, string, required
    - `name`, string
  - `workIndustries`, array of object
    - `id`, string, required
    - `name`, string
  - `industries`, array of string
  - `companySizes`, array of string
  - `seniorities`, array of string
  - `jobFunctions`, array of string
  - `skills`, array of string
  - `audienceInclude`, array of string
  - `audienceExclude`, array of string
  - `communities`, array of string
  - `excludedCommunities`, array of string
  - `conversationKeywords`, array of string
  - `excludedConversationKeywords`, array of string
- `bidAmount`, number
- `roasAverageFloor`, number
- `valueRuleSetId`, string: Matches `^\d+$`
- `valueRulesApplied`, boolean
- `platformSpecificData`, object
  - `optimizationGoal`, string
  - `billingEvent`, string
  - `startDate`, string
  - `endDate`, string
  - `dailyMinSpendTarget`, number
  - `lifetimeMinSpendTarget`, number
  - `customerLifecycle`, object
    - `strategy`, string, required: One of `all_customers`, `new_customers`, `new_customers_excluding_engaged`
    - `existingCustomerAudienceIds`, array of string
    - `engagedAudienceIds`, array of string
  - `adSchedule`, object
    - `dayOfWeek`, string, required: One of `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`
    - `startHour`, integer, required: 0 to 23
    - `endHour`, integer, required: 1 to 24
    - `timezoneType`, string: One of `USER`, `ADVERTISER`. Default `USER`
  - `promotedObject`, object
    - `pixelId`, string
    - `customEventType`, string
    - `customEventStr`, string
    - `pageId`, string
    - `applicationId`, string
    - `objectStoreUrl`, string
    - `customConversionId`, string
    - `productCatalogId`, string
    - `productSetId`, string
    - `offlineConversionDataSetId`, string
    - `whatsappPhoneNumber`, string

## Example request

```bash
curl -X PUT "https://api.pozy.ai/v1/ads/ad-sets/60484b408d44e7c2492bfec5" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "platform": "facebook"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/ad-sets/60484b408d44e7c2492bfec5", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    platform: "facebook"
  }),
});
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.put(
    "https://api.pozy.ai/v1/ads/ad-sets/60484b408d44e7c2492bfec5",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "platform": "facebook",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `budget`, object
  - `amount`, number, required
  - `type`, string, required: One of `daily`, `lifetime`
- `budgetLevel`, string: One of `adset`
- `status`, string: One of `active`, `paused`
- `platformAdSetStatus`, string: Can be null
- `platformCampaignStatus`, string: Can be null
- `statusReadAt`, string (date-time): Can be null
- `statusUpdated`, integer: One of `0`, `1`
- `statusSkipped`, integer: One of `0`, `1`
- `statusSkippedReasons`, array of string
- `bidStrategy`, string: One of `LOWEST_COST_WITHOUT_CAP`, `LOWEST_COST_WITH_BID_CAP`, `COST_CAP`, `LOWEST_COST_WITH_MIN_ROAS`
- `bidAmount`, number: Can be null
- `roasAverageFloor`, number: Can be null
- `platformSpecificData`, object
- `targeting`, object
- `startDate`, string
- `endDate`, string: Can be null

```json
{
  "budget": {
    "amount": 12.5,
    "type": "daily"
  },
  "budgetLevel": "adset",
  "status": "active",
  "platformAdSetStatus": "instagram",
  "platformCampaignStatus": "instagram",
  "statusReadAt": "2026-10-02T09:00:00.000Z",
  "statusUpdated": 0,
  "statusSkipped": 0,
  "statusSkippedReasons": [
    "active"
  ],
  "bidStrategy": "LOWEST_COST_WITHOUT_CAP",
  "bidAmount": 12.5,
  "roasAverageFloor": 12.5,
  "platformSpecificData": {},
  "targeting": {},
  "startDate": "string",
  "endDate": "string"
}
```
