Remove items from campaign tree
Remove one or many campaign/adset/ad nodes from the KOAST TREE only, this does NOT pause or delete the entity on the ad platform and does NOT stop spend on already-published ads.
Tool name: remove-nodes.
Remove one or many campaign/adset/ad nodes from the KOAST TREE only, this does NOT pause or delete the entity on the ad platform and does NOT stop spend on already-published ads. Pass nodes: [{ nodeId, nodeType }, ...]. Accepts a mix of node types; unknown ids return in notFound, the rest are removed from the Koast tree. To actually stop spend on a live ad/adset/campaign, use updateNode with properties: { status: "PAUSED" } instead. Destructive on the Koast tree and cannot be undone.
When to use
Remove 1-N campaign/adset/ad nodes from the Koast tree only. Does NOT pause or delete the live entity on the ad platform and does NOT stop spend. To stop spend on a live entity, use updateNode with properties.status: "PAUSED". The unified node-removal tool, handles single and bulk. Unknown ids return in notFound.
Access
| Property | Value |
|---|---|
| Required scope | write |
| Publishes | No |
| Read-only | No |
| Destructive | Yes |
| Idempotent | No |
| Open world | No |
Input
| Field | Type | Required | Description |
|---|---|---|---|
campaignLaunchId | string | Yes | Campaign launch ID (a.k.a. batch ID). Read it from the Current Context block when one is in scope, or resolve it from a mention via listAccountCampaigns / the campaign tree when the user @-mentioned a different launch. |
nodes | object[] | Yes | Nodes to delete (1-200). Each entry names its nodeId and nodeType. At least 1 item, at most 200 items. |
nodes[].nodeId | string | Yes | ID of the node to delete |
nodes[].nodeType | string | Yes | Type of the node. One of campaign, adset, ad. |
Output
| Field | Type | Required | Description |
|---|---|---|---|
removedIds | string[] | Yes | Ids named in the request that existed and were removed. Cascaded children are not listed here. |
deleted | string[] | Yes | The same ids as removedIds. |
notFound | string[] | Yes | Ids named in the request that did not exist in this launch. Nothing was removed for them. |
count | number | Yes | How many of the requested nodes were removed, the length of removedIds. Does not include cascaded children. |
cascadedIds | string[] | Yes | Ids of child nodes removed together with a removed parent. They were not named in the request. |
totalRemoved | number | Yes | Total nodes removed, parents plus cascaded children, count plus the length of cascadedIds. |
validation | object | No |
REST equivalent
POST /v1/brands/{brandId}/launches/{launchId}/nodes/remove, Remove items from campaign tree. CLI: koast remove-nodes.