API referenceStructure Templates

Edit structure template rules

Updates the structure template. Pass only the fields to change; a new config is validated before it is saved.

PATCH
/v1/brands/{brandId}/structure-templates/{templateId}
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.

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
application/json
  1. body
name?string
Length1 <= length
config?
audiences?array<>

Template-level audiences (targetingSet | customAudience | savedAudience). At least one is required to save or apply.

settings?
scope?string
Value in"single""multiple"
status?string
Value in"DRAFT""READY""NEEDS_ATTENTION"
accounts?array<>

Response Body

Edit structure template rules

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

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