Swap creatives
Replaces the creatives on the ad set's ads with creativeIds, in order, keeping each ad's copy. Existing ads are edited in place; extra creatives clone an existing ad, and surplus ads are removed from the Koast tree and listed in removedAdIds.
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.
launchId*stringThe campaign launch (batch) id.
adsetNodeId*stringKoast adset node id whose ads should carry the new creatives.
1 <= lengthIdempotency-Key?stringRetrying with the same key within 24 hours returns the first response without acting again.
length <= 255application/json- body
creativeIds*array<number>Numeric creative IDs to place on the ad set, in order. Copy on existing ads is preserved.
1 <= items <= 100Swap creatives
application/json- response
adsetId*stringKoast adset node id the creatives were placed on.
ads*array<>The ads the ad set carries after the swap, each with the creative it now runs.
removedAdIds*array<string>Ids of surplus ads deleted from the Koast tree because fewer creatives were supplied than the ad set had ads. Empty when none were deleted.
validation?[key: string]?unknowncurl -X POST "https://example.com/v1/brands/0/launches/string/ad-sets/string/creatives/swap" \ -H "Authorization: Bearer koast_sk_..." \ -H "Content-Type: application/json" \ -d '{ "creativeIds": [ 0 ] }'{ "adsetId": "string", "ads": [ { "adId": "string", "creativeId": 0, "property1": null, "property2": null } ], "removedAdIds": [ "string" ], "validation": { "valid": true, "issueCount": 0, "issues": [ "string" ], "property1": null, "property2": null }, "property1": null, "property2": null}Required scope: write. CLI: koast swap-creatives, see Launches commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.
Get ad set details
Returns the full details of one ad set in the launch: settings, targeting, budget, schedule, placements, optimization, assets and links, plus its ads.
Attach lead form
Turns on instant forms for the lead-generation ad set adsetNodeId and sets leadFormId as its form. Draft ad sets only; a live ad set returns 409.