Create structure template
Creates a structure template from config (a structure state, validated before saving), audiences (at least one), settings and accounts.
bearerAuthAuthorizationBearer <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*integerThe brand the request acts on. Every brand-scoped resource lives under its brand.
Idempotency-Key?stringRetrying with the same key within 24 hours returns the first response without acting again.
length <= 255application/json- body
name*stringTemplate name
1 <= length <= 191config*audiences*array<>Template-level audiences (targetingSet | customAudience | savedAudience). At least one is required to save or apply.
settings?Step-2 settings (objective, CBO+budget, attribution, performance goal, isAdCategorized), required to apply.
scope?string"single""multiple"accounts?array<>Create structure template
application/json- response
[key: string]?unknowncurl -X POST "https://example.com/v1/brands/0/structure-templates" \ -H "Authorization: Bearer koast_sk_..." \ -H "Content-Type: application/json" \ -d '{ "name": "string", "config": { "countMode": "dynamic", "n": 1, "adsets": "fixed", "k": 1, "per": 1, "placement": "broadcast", "splitMode": "even", "weights": [ 0 ], "name": "string", "ops": [ { "property1": null, "property2": null } ], "property1": null, "property2": null }, "audiences": [ { "property1": null, "property2": null } ] }'{ "property1": null, "property2": null}Required scope: write. CLI: koast author-structure-template, see Structure Templates commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.