Upload creative
Stores an image in the brand's creative library and returns its creativeId. Pass exactly one of imageUrl (a public https URL that Koast downloads and re-hosts) or fileData (base64 bytes, with contentType and fileName). Uploading bytes the brand already holds returns the existing creative with reused: true. Images only; no ad is created or changed.
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
imageUrl?stringPublic https url of the image to store. Koast downloads it and re-hosts it, so a link that later expires does not rot the ad. Use this whenever the user gives you a link.
1 <= lengthfileData?stringStandard base64 of the image bytes, with NO data-url prefix. Intended for the Koast creative gallery, which reads a dropped file and sends it here. Do not attempt to write this yourself, if the user attached an image to the chat, say you cannot read its bytes and ask for a link or for them to drop it in the gallery.
1 <= length <= 13333338contentType?stringMedia type of fileData. Required with fileData, ignored with imageUrl.
"image/jpeg""image/png""image/webp""image/gif"fileName?stringFile name to store it under. Required with fileData; defaults to the url's own name otherwise.
1 <= length <= 200name?stringDisplay name for the creative. Defaults to the file name.
1 <= length <= 200Upload creative
application/json- response
creativeId*integerPass this as creativeId to addAds, distributeCreative or swapCreatives.
-9007199254740991 <= value <= 9007199254740991name*stringurl*string|nullpreviewUrl*|The url a Koast view may render, filtered through the same host list that writes the view CSP. Null means the asset is stored somewhere the iframe may not load, the creative still works in an ad.
width*number|nullheight*number|nullreused*booleanTrue when the brand already held these exact bytes, so the existing creative was returned instead of a duplicate being made.
[key: string]?unknowncurl -X POST "https://example.com/v1/brands/0/creatives" \ -H "Authorization: Bearer koast_sk_..." \ -H "Content-Type: application/json" \ -d '{}'{ "creativeId": -9007199254740991, "name": "string", "url": "string", "previewUrl": "string", "width": 0, "height": 0, "reused": true, "property1": null, "property2": null}Required scope: write. CLI: koast upload-creative, see Creatives commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.
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.
Connect ClickFlare
Connects ClickFlare to the brand. Koast checks the key against ClickFlare, reads the account timezone and currency, and detects which tracking fields carry the ad platform campaign, ad set and ad ids. Sending a new key to a connected brand replaces the key and keeps the settings. Answers 422 when ClickFlare rejects the key. Requires an organization owner or admin.