---
title: "Detach Policy Set Campaigns"
method: POST
path: "/api/v1/policy-sets/{policy_set_id}/campaigns/detach"
tags: ["policy-sets"]
---

# Detach Policy Set Campaigns

`POST /api/v1/policy-sets/{policy_set_id}/campaigns/detach`

## Request

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

Unbind campaigns from a policy set.

Pass ``campaign_ids`` (ids bound to other sets are ignored) or
``detach_all=true`` to clear the whole membership.

## Path parameters

- `policy_set_id` string, uuid, required

## Request body

- DetachCampaignsRequest: Request body for POST /policy-sets/{id}/campaigns/detach. Incremental unbind: listed campaigns bound to this set get their FK cleared; ids bound elsewhere are ignored. ``detach_all=true`` clears the whole org-scoped membership and ignores ``campaign_ids``.
  - `campaign_ids` string[]
  - `detach_all` boolean

## Response `204`

Successful Response

## 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)
