API referenceLaunches

Apply structure template

Populates the launch, a draft pipeline card, with the structure template's campaign, ad set and ad structure. It never publishes. A card that is already populated is replaced only when overwrite is true. Use suppliedDeferred for per-account values the template leaves open.

POST
/v1/brands/{brandId}/launches/{launchId}/structure-templates/{templateId}/apply
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.

templateId*string

Structure template ID. Omit to read the template currently open in the builder from the Current Context block. Pass an explicit id only when acting on a different template than the one in scope.

Length1 <= length
Idempotency-Key?string

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

Lengthlength <= 255
application/json
  1. body
overwrite?boolean
suppliedDeferred?

Per-account deferred values keyed by adAccountId, supplied at apply.

Response Body

Apply structure template

application/json
  1. response
[key: string]?unknown
curl -X POST "https://example.com/v1/brands/0/launches/string/structure-templates/string/apply" \  -H "Authorization: Bearer koast_sk_..." \  -H "Content-Type: application/json" \  -d '{}'
{  "property1": null,  "property2": null}

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