API referenceLaunches

Remove items from campaign tree

Removes 1-200 campaign, ad set or ad nodes from the launch, together with their children. Only the Koast tree changes: anything already published keeps running on the ad platform. Ids not found in the launch are returned in notFound. Cannot be undone.

POST
/v1/brands/{brandId}/launches/{launchId}/nodes/remove
bearerAuth
headerAuthorizationBearer <token>

An organization API key (koast_sk_…) with the API surface enabled, or an OAuth access token issued by Koast (koast_at_…) whose audience covers this API. REST access requires an active Agency plan.

brandId*integer

The brand the request acts on. Every brand-scoped resource lives under its brand.

launchId*string

The campaign launch (batch) id.

Idempotency-Key?string

Retrying with the same key within 24 hours returns the first response without acting again.

Lengthlength <= 255
application/json
  1. body
nodes*array<>

Nodes to delete (1-200). Each entry names its nodeId and nodeType.

Items1 <= items <= 200

Response Body

Remove items from campaign tree

application/json
  1. response
removedIds*array<string>

Ids named in the request that existed and were removed. Cascaded children are not listed here.

deleted*array<string>

The same ids as removedIds.

notFound*array<string>

Ids named in the request that did not exist in this launch. Nothing was removed for them.

count*number

How many of the requested nodes were removed, the length of removedIds. Does not include cascaded children.

cascadedIds*array<string>

Ids of child nodes removed together with a removed parent. They were not named in the request.

totalRemoved*number

Total nodes removed, parents plus cascaded children, count plus the length of cascadedIds.

validation?
[key: string]?unknown
curl -X POST "https://example.com/v1/brands/0/launches/string/nodes/remove" \  -H "Authorization: Bearer koast_sk_..." \  -H "Content-Type: application/json" \  -d '{    "nodes": [      {        "nodeId": "string",        "nodeType": "campaign"      }    ]  }'
{  "removedIds": [    "string"  ],  "deleted": [    "string"  ],  "notFound": [    "string"  ],  "count": 0,  "cascadedIds": [    "string"  ],  "totalRemoved": 0,  "validation": {    "valid": true,    "issueCount": 0,    "issues": [      "string"    ],    "property1": null,    "property2": null  },  "property1": null,  "property2": null}

Required scope: write. CLI: koast remove-nodes, see Launches commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.