API referenceLaunches

Add campaign

Adds the campaign to the launch. A launch holds at most one campaign, so this fails if one already exists. objective is one of website-conversions, lead-form or traffic; platform-native objective names are rejected.

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

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

Lengthlength <= 255
application/json
  1. body
name*string

Name for the new campaign

Length1 <= length <= 500
objective?string

Campaign objective. Must be one of: 'website-conversions', 'lead-form', 'traffic'. These are Koast-side canonical values, DO NOT pass Meta-native objective enum names like OUTCOME_SALES or OUTCOME_LEADS.

Value in"website-conversions""lead-form""traffic"

Response Body

Add campaign

application/json
  1. response
id*string
name*string
objective?string|null
validation?
[key: string]?unknown
curl -X POST "https://example.com/v1/brands/0/launches/string/campaigns" \  -H "Authorization: Bearer koast_sk_..." \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "string",  "name": "string",  "objective": "string",  "validation": {    "valid": true,    "issueCount": 0,    "issues": [      "string"    ],    "property1": null,    "property2": null  },  "property1": null,  "property2": null}

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