API referenceLaunches

Import campaigns

Imports a campaign from the ad platform (campaignIds) into the launch, with its ad sets and ads. sourceType: existing attaches to the live campaign and keeps its platform ids; duplicate copies it as an editable draft. Pass sourceAdAccountId to import from another ad account the brand is connected to. The import runs in the background, so a large campaign may report still-running when the response returns.

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

Ad-platform campaign IDs to import (non-empty)

Items1 <= items <= 1
sourceType?string

'existing' attaches to the live campaign (keeps its ad-platform IDs). 'duplicate' copies it as an editable draft with ad-platform IDs stripped, prefer cloneLiveCampaign for that. Anything else is rejected by the API.

Default"existing"
Value in"existing""duplicate"
sourceAdAccountId?string

Ad account id to import FROM (e.g. act_1234 on Meta), when it differs from the batch's own ad account. Get it from listMyAdAccounts, never invent it. Omit for a same-account import. The brand must already have a connected credential for this account; if it does not, the API refuses and this tool reports the refusal instead of importing.

Length1 <= length

Response Body

Import campaigns

application/json
  1. response
[key: string]?unknown
curl -X POST "https://example.com/v1/brands/0/launches/string/campaigns/import" \  -H "Authorization: Bearer koast_sk_..." \  -H "Content-Type: application/json" \  -d '{    "campaignIds": [      "string"    ]  }'
{  "property1": null,  "property2": null}

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