API referenceLaunches

Launch campaign

Publishes the launch to the ad platform. Without confirm: true nothing is published: the launch is validated and a preview of its campaigns, ad sets, ads and budgets is returned (mode: preview). With confirm: true the publish jobs are queued and mode: publish is returned. A launch that fails validation (in either mode) answers 400 validation_failed with the message Launch validation failed: N issues. and one { field, message } per issue in details, where field names the node (campaigns[<id>], adSets[<id>] or ads[<id>]) and, when known, its setting (ads[<id>].creative).

POST
/v1/brands/{brandId}/launches/{launchId}/publish
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.

launchId*string

The campaign launch (batch) id.

Idempotency-Key*string

Required here. Retrying with the same key within 24 hours returns the first response without acting again.

Lengthlength <= 255
application/json
  1. body
confirm?boolean

Set true ONLY after the user has explicitly authorized publishing on a prior turn. When false or omitted, the tool returns a preview and asks for confirmation, it does NOT publish.

Response Body

Launch campaign

application/json
  1. response
mode*string
message*string
preview*
[key: string]?unknown
curl -X POST "https://example.com/v1/brands/0/launches/string/publish" \  -H "Authorization: Bearer koast_sk_..." \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "mode": "preview",  "message": "string",  "preview": {    "campaignCount": 0,    "adsetCount": 0,    "adCount": 0,    "campaigns": [      {        "id": "string",        "name": "string",        "objective": "string",        "budget": {          "type": "daily",          "amountMinorUnits": 0,          "property1": null,          "property2": null        },        "adsets": [          {            "id": "string",            "name": "string",            "isLive": true,            "adCount": 0,            "budget": {              "type": "daily",              "amountMinorUnits": 0,              "property1": null,              "property2": null            },            "property1": null,            "property2": null          }        ],        "property1": null,        "property2": null      }    ],    "property1": null,    "property2": null  },  "property1": null,  "property2": null}

Required scope: publish. CLI: koast launch-campaign, see Launches commands. Authentication, headers, errors and pagination work the same on every operation. See Conventions.