---
title: "Update Policy Set"
method: PUT
path: "/api/v1/policy-sets/{policy_set_id}"
tags: ["policy-sets"]
---

# Update Policy Set

`PUT /api/v1/policy-sets/{policy_set_id}`

## Request

- Base URL: `https://app.kaminari.ad`
- URL: `https://app.kaminari.ad/api/v1/policy-sets/{policy_set_id}`
- Auth: HTTP bearer

Update a policy set.

## Path parameters

- `policy_set_id` string, uuid, required

## Request body

- UpdatePolicySetRequest: Request body for PUT /policy-sets/{id}. ``campaign_ids`` uses full-replace semantics but is only applied when present in the payload (``model_fields_set``) so v1 clients that omit it never wipe existing bindings.
  - `name` string, required
  - `description` string
  - `entries` PolicyEntryRequest[], required
    - `rule_type` 'tag' | 'iab_v3' | 'brand' | 'ai_category' | 'custom_taxonomy'
    - `tag_slug` string, nullable
    - `iab_v3` IabV3PolicyCategoryRequest: The validated IAB V3 prefix for an ``iab_v3`` rule. ``tier1`` is required (the canonical V3 tier1 name); deeper tiers are optional and form a prefix at evaluation time. Path validity against the canonical V3 tree is enforced by the :class:`IabV3TaxonomyReader` in the use case: non-canonical paths are rejected before they reach the repository.
      - `tier1` string, required
      - `tier2` string, nullable
      - `tier3` string, nullable
      - `tier4` string, nullable
    - `brand` string, nullable
    - `ai_category` AiCategoryRequest: The freeform AI-category prefix carried by an ``ai_category`` rule. ``tier1`` is required; deeper tiers tighten the prefix. Unlike ``iab_v3`` rules, the API does NOT validate the path against any canonical tree — the AI category field on a scan is freeform per classification. The only structural rule is "no gaps": ``tier3`` requires ``tier2``, ``tier4`` requires ``tier3``.
      - `tier1` string, required
      - `tier2` string, nullable
      - `tier3` string, nullable
      - `tier4` string, nullable
    - `custom_taxonomy` CustomTaxonomyRefRequest: Reference to one node-prefix inside a per-org custom taxonomy. ``taxonomy_id`` is checked at use-case time against the caller's org (cross-BC ownership reader); ``tier1`` is required; deeper tiers tighten the prefix. Tier values are NOT validated against the taxonomy tree at write time — eval-time mismatch simply means the rule never fires (safe).
      - `taxonomy_id` string, uuid, required
      - `tier1` string, required
      - `tier2` string, nullable
      - `tier3` string, nullable
      - `tier4` string, nullable
    - `country_codes` string[]
  - `campaign_ids` string[]

## Response `200`

Successful Response

- PolicySetResponse: Policy set returned by API (with entries + bound-campaigns preview). ``campaigns`` is a bounded preview (first N by name, N = ``PoliciesSettings.campaigns_preview_limit``); ``campaigns_total`` carries the real membership size. The full list is served by the paginated ``GET /policy-sets/{id}/campaigns`` endpoint.
  - `id` string, uuid, required
  - `name` string, required
  - `description` string, required
  - `organization_id` string, uuid, required
  - `visibility` string, required
  - `is_approved` boolean, required
  - `is_default` boolean, required
  - `entries` PolicyEntryResponse[], required
    - `id` string, uuid, required
    - `rule_type` string, required
    - `tag_slug` string, nullable
    - `iab_v3` PolicyEntryIabV3Response: The validated IAB V3 prefix on an ``iab_v3`` rule.
      - `tier1` string, required
      - `tier2` string, nullable
      - `tier3` string, nullable
      - `tier4` string, nullable
    - `brand` string, nullable
    - `ai_category` PolicyEntryAiCategoryResponse: The freeform AI-category prefix on an ``ai_category`` rule.
      - `tier1` string, required
      - `tier2` string, nullable
      - `tier3` string, nullable
      - `tier4` string, nullable
    - `custom_taxonomy` PolicyEntryCustomTaxonomyResponse: The custom-taxonomy node prefix on a ``custom_taxonomy`` rule.
      - `taxonomy_id` string, uuid, required
      - `tier1` string, required
      - `tier2` string, nullable
      - `tier3` string, nullable
      - `tier4` string, nullable
    - `country_codes` string[], required
  - `campaigns` LinkedCampaignResponse[]
    - `id` string, uuid, required
    - `name` string, required
    - `is_archived` boolean, required
  - `campaigns_total` integer
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kaminari/apis/kaminari-ad-api.md) · [All operations](https://skmtc.dev/kaminari/apis/kaminari-ad-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kaminari/apis/kaminari-ad-api/revisions/013f86e2fd32?raw)
