Save creative template
Saves an html ad layout as a creative template for the brand. Every {{slot}} in the html must be listed in slots, and every listed slot must appear in the html. Render it with render-creative and templateId.
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*stringA short name the user will recognise.
1 <= length <= 120html*stringThe layout as a complete html page, with {{slot}} wherever text changes between versions.
1 <= length <= 200000slots*array<>Every {{slot}} in the html, each once, with what goes in it.
items <= 30aspectRatio*stringThe aspect ratio the layout is designed for.
"1:1""4:5""9:16"referenceUrl?stringThe ad or image the layout was modelled on, if any.
urilength <= 2000previewCreativeId?integerA library creative rendered from this template, shown as its preview.
0 < value <= 9007199254740991Save creative template
application/json- response
templateId*integerPass this as templateId to render-creative.
-9007199254740991 <= value <= 9007199254740991name*stringaspectRatio*stringslots*array<>referenceUrl*string|nullpreviewCreativeId*|nullpreviewUrl*string|nullhtml*stringcreatedAt*string[key: string]?unknowncurl -X POST "https://example.com/v1/brands/0/creative-templates" \ -H "Authorization: Bearer koast_sk_..." \ -H "Content-Type: application/json" \ -d '{ "name": "string", "html": "string", "slots": [ { "name": "string", "description": "string" } ], "aspectRatio": "1:1" }'{ "templateId": -9007199254740991, "name": "string", "aspectRatio": "string", "slots": [ { "name": "string", "description": "string", "property1": null, "property2": null } ], "referenceUrl": "string", "previewCreativeId": -9007199254740991, "previewUrl": "string", "html": "string", "createdAt": "string", "property1": null, "property2": null}Required scope: write. CLI: koast save-creative-template, see Creative Templates commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.
List creative templates
Lists the brand's saved creative templates, newest first, with their html, slots and preview.
List creatives
Lists the images and videos in the brand's creative library, newest first, with the creativeId used when attaching a creative to an ad. Filter with search and kind, or pass creativeIds to fetch a specific set. A creative with ready: false is a video still processing and cannot be attached yet.