API referenceLaunches

Get campaign tree

Returns the launch's structure as a campaign, ad set and ad tree with ids, names, statuses, budgets and live flags, plus counts per level. Settings, metrics and creative data are not included. importInProgress is true while a background import is still filling the tree.

GET
/v1/brands/{brandId}/launches/{launchId}/tree
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.

Response Body

Get campaign tree

application/json
  1. response
summary*string
counts*
importInProgress*boolean
tree*|null
[key: string]?unknown
curl -X GET "https://example.com/v1/brands/0/launches/string/tree" \  -H "Authorization: Bearer koast_sk_..."
{  "summary": "string",  "counts": {    "campaigns": 0,    "adsets": 0,    "ads": 0,    "campaignBreakdown": {      "total": 0,      "live": 0,      "draft": 0,      "active": 0,      "paused": 0,      "withIssues": 0,      "property1": null,      "property2": null    },    "adsetBreakdown": {      "total": 0,      "live": 0,      "draft": 0,      "active": 0,      "paused": 0,      "withIssues": 0,      "property1": null,      "property2": null    },    "adBreakdown": {      "total": 0,      "live": 0,      "draft": 0,      "active": 0,      "paused": 0,      "withIssues": 0,      "property1": null,      "property2": null    },    "property1": null,    "property2": null  },  "importInProgress": true,  "tree": {    "launchId": "string",    "title": "string",    "status": "string",    "campaigns": [      {        "id": "string",        "name": "string",        "status": "string",        "isLive": true,        "platformId": "string",        "platformStatus": "string",        "displayStatus": "string",        "objective": "string",        "isCBO": true,        "budget": {          "type": "daily",          "amountMinorUnits": 0,          "property1": null,          "property2": null        },        "adsets": [          {            "id": "string",            "name": "string",            "status": "string",            "isLive": true,            "platformId": "string",            "platformStatus": "string",            "displayStatus": "string",            "budget": {              "type": "daily",              "amountMinorUnits": 0,              "property1": null,              "property2": null            },            "ads": [              {                "id": "string",                "name": "string",                "status": "string",                "isLive": true,                "platformId": "string",                "platformStatus": "string",                "displayStatus": "string",                "creativeName": "string",                "property1": null,                "property2": null              }            ],            "property1": null,            "property2": null          }        ],        "property1": null,        "property2": null      }    ],    "property1": null,    "property2": null  },  "property1": null,  "property2": null}

Required scope: read. CLI: koast get-campaign-tree, see Launches commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.